Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
m6121 committed Feb 16, 2023
1 parent fb7f2dc commit fda4d25
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ <h2 id="import-project">{% trans 'Import values' %}</h2>
{% url 'project_update_import' project.id as upload_url %}
{% include 'core/upload_form.html' with upload_url=upload_url label=True %}
</li>
{% if settings.NESTED_PROJECTS and project.get_ancestors %}
{% if settings.NESTED_PROJECTS and ancestors_import %}
<li>
<p>
<strong>{% trans 'Import from parent project' %}</strong>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<input type="hidden" name="method" value="import_project">

<select class="form-control" name="source">
{% for project in project.get_ancestors %}
{% for project in ancestors_import %}
<option value="{{ project.id }}">{{ project.title }}</option>
{% endfor %}
</select>
Expand Down
2 changes: 2 additions & 0 deletions rdmo/projects/views/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ def get_context_data(self, **kwargs):
.filter_catalog(self.object.catalog) \
.filter_group(self.request.user) \
.filter_availability(self.request.user).exists()
context['ancestors_import'] = ancestors.filter(user=self.request.user) \
.exclude(id=project.id)
context['memberships'] = memberships.order_by('user__last_name', '-project__level')
context['integrations'] = integrations.order_by('provider_key', '-project__level')
context['providers'] = get_plugins('PROJECT_ISSUE_PROVIDERS')
Expand Down

0 comments on commit fda4d25

Please sign in to comment.