Skip to content

Commit d8ce179

Browse files
committed
Refactor browsable
1 parent 63b9b84 commit d8ce179

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tigacrafting/managers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,10 +313,11 @@ def _assignable(self, state: bool = True) -> QuerySet:
313313
def browsable(self, user: Union[User, 'tigaserver_app.TigaUser']) -> QuerySet:
314314
from tigacrafting.models import IdentificationTask, UserStat
315315

316+
qs = self
317+
316318
view_archived_perm = '%(app_label)s.view_archived_identificationtasks' % {
317319
'app_label': IdentificationTask._meta.app_label,
318320
}
319-
qs = self
320321
# Exclude archived tasks unless user is a full User and has permission
321322
if not user.has_perm(view_archived_perm):
322323
qs = qs.exclude(status=IdentificationTask.Status.ARCHIVED)

0 commit comments

Comments
 (0)