Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug/VOGRE-45 #49

Closed
wants to merge 4 commits into from
Closed

Bug/VOGRE-45 #49

wants to merge 4 commits into from

Conversation

rajvi-patel-22
Copy link
Member

@rajvi-patel-22 rajvi-patel-22 commented Jan 8, 2025

Guidelines for Pull Requests

If you haven't yet read our code review guidelines, please do so, You can find them here.

Please confirm the following by adding an x for each item (turn [ ] into [x]).

  • I have removed all code style changes that are not necessary (e.g. changing blanks across the whole file that don’t need to be changed, adding empty lines in parts other than your own code)
  • I am not making any changes to files that don’t have any effect (e.g. imports added that don’t need to be added)
  • I do not have any sysout statements in my code or commented out code that isn’t needed anymore
  • I am not reformatting any files in the wrong format or without cause.
  • I am not changing file encoding or line endings to something else than UTF-8, LF
  • My pull request does not show an insane amount of files being changed although my ticket only requires a few files being changed
  • I have added Javadoc/documentation where appropriate
  • I have added test cases where appropriate
  • I have explained any part of my code/implementation decisions that is not be self-explanatory

Please provide a brief description of your ticket

When you try to add a text from the Text menu (when you don’t select a project), the project id is missing when trying to add a text.

404: .../repository/1/group/2601560/text/ZQ5EDSBR/project/
https://diging.atlassian.net/browse/VOGRE-45

Are there any other pull requests that this one depends on?

Anything else the reviewer needs to know?

... describe here ...

@diging-jenkins
Copy link
Collaborator

Can one of the admins verify this patch?

@@ -127,7 +127,7 @@ <h5 class="list-group-item-heading mb-0">Group Texts</h5>
<path d="M14 4.5V14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h5.5zm-3 0A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4.5z"/>
</svg>{% else %}{% endif %}</td>
<td>
<a href="{% if project_id %}{% url 'repository_text_import' repository.id group_id text.key project_id %}{% else %}{% url 'repository_text_import' repository.id group_id text.key %}{% endif %}" class="btn btn-primary btn-sm">Import</a>
<a href="{% if project_id %}{% url 'repository_text_import' repository.id group_id text.key project_id %}{% else %}{% url 'repository_project_list' repository.id group_id text.key %}{% endif %}" class="btn btn-primary btn-sm">Import</a>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking at this more closely, just put the redirect url here directly instead of having the if statement in the view method.

vogon/urls.py Outdated
@@ -132,6 +132,7 @@
re_path(r'^repository/(?P<repository_id>[0-9]+)/search/$', views.repository_views.repository_search, name='repository_search'),
re_path(r'^repository/(?P<repository_id>[0-9]+)/collections/(?P<group_id>[0-9]+)/$', views.repository_views.repository_collection, name='repository_collection'),
re_path(r'^repository/(?P<repository_id>[0-9]+)/collection/(?P<group_id>[0-9]+)/group-collection/(?P<group_collection_id>[a-zA-Z0-9]+)/texts/$', views.repository_views.repository_collection_texts, name='repository_collections_text_list'),
re_path(r'^repository/(?P<repository_id>[0-9]+)/group/(?P<group_id>[a-zA-Z0-9]+)/text/(?P<text_key>[a-zA-Z0-9]+)/project/$', views.repository_views.repository_text_import, name='repository_project_list'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and then we don't need this

@jdamerow jdamerow closed this Jan 9, 2025
@rajvi-patel-22 rajvi-patel-22 reopened this Jan 9, 2025
@jdamerow
Copy link
Member

Resolve conflicts please

@jdamerow jdamerow closed this Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants