[BUG]Admin - Aktiviteter: Listen med aktiviteter har 5 kolonner for "Forening for medlemskab"
Closed this issue · 3 comments
den er ikke umiddelbar reproducerbar i test miljø (der har 3 forening, 3 afdelinger, 6 aktiviteter)
@lakridserne - det ser ud til at der er 174 aktiviteter der er forkert sat op
Prøv evt at køre
select a.union_id, a.department_id, a.activitytype_id, a.name from members_activity a, members_department d where a.department_id = d.id and a.union_id <> d.union_id and a.union_id <> 1
5 af dem har typen "FORLØB" (selvom teksten er noget med Forenings medlemskab).
Og de alle burde da vel ha activity.union_id = 1 ?
Det var dette i Activity_admin.py:
activity_membership_union_link
def changelist_view(self, request, extra_context=None):
# This is to show the membership_union_link for super admins only
if request.user.is_superuser:
self.list_display += ("activity_membership_union_link",)
return super(ActivityAdmin, self).changelist_view(
request, extra_context=extra_context
)
Adding the column to the view for each refresh :-(
I'll remove the column, not needed , especially after change of members table