Skip to content

Commit 7b536db

Browse files
committed
Fix bug that gave error on every wagtail admin user save.
1 parent 55f430f commit 7b536db

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

hypha/apply/projects/templates/application_projects/includes/project_documents.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ <h3 class="flex gap-2 items-center font-medium text-h4 list-col-grow">
125125
{% endif %}
126126
</a>
127127
{% endif %}
128-
{% if not user.is_applicant %}
128+
{% if object.user_has_updated_pf_details and not user.is_applicant %}
129129
<a
130130
class="btn btn-outline btn-secondary btn-sm"
131131
href="{% url 'apply:projects:approval' pk=project.submission.pk %}">

hypha/apply/users/wagtail_hooks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def notify_after_create_user(request, user):
2727
def notify_after_edit_user(request, user):
2828
roles = list(user.groups.values_list("name", flat=True))
2929
if user.is_superuser:
30-
roles.append(SUPERADMIN)
30+
roles.append(str(SUPERADMIN))
3131
if roles:
3232
roles = ", ".join(roles)
3333
messenger(

0 commit comments

Comments
 (0)