#4331 pagure ui/app.py: pass on AttributeError of group.projects
Closed 7 months ago by jlanda. Opened a year ago by jlanda.
jlanda/pagure fix-dashboard-projects  into  master

file modified
+1 -1

@@ -218,7 +218,7 @@ 

                          access = repoaccess

          grouplist = []

          for group in groups:

-             if repo in group.projects:

+             if group and repo in group.projects:

                  thegroup = {"group_name": "", "access": ""}

                  thegroup["group_name"] = group.group_name

                  for a in repo.contributor_groups:

I just adjusting this to if group and repo in group.projects instead :)

rebased onto de9bb8a537c45a2ae71a971d8e466ead54da0a77

a year ago

Anyhow, the code is going inside the for group in groups and the error comes from the projects attribute so wouldn't it be better a if group and group.projects and repo ?

I'll try to figure how can we test this during this weekend :)

rebased onto b20830a4d0bf6f4578ba0bcc2c03d0312588facf

a year ago

The change itself looks good, I'm very curious about the test though (ie: how it got triggered :))

Can't reproduce this on a normal usage of pagure, just when I use dev-data.py -a so dunno how to proceed with it. Should I add tests against the weird dev-data.py db state? Does that worth it since it can not be reproduced using standard pagure workflows?

I think we should try to fix the dev-data script then :)

Note that we already test the dev-data script in the tests itself, so we could adjust this test to ensure the fix to dev-data does fix the situation.

I'm hitting this using fas backend too, so now it does not look as a dev-data problem :D

I'll return here someday :)

rebased onto 608a3056ee87c6fa88836c3ca7de48d1770c10dc

8 months ago

rebased onto b3e2f53

7 months ago

pretty please pagure-ci rebuild

7 months ago

Pull-Request has been closed by jlanda

7 months ago