mirror of
https://github.com/jazzband/django-authority.git
synced 2026-05-17 03:51:07 +00:00
Break out of for-loop when field found
Matching the `return` statement that the previous commit replaced.
This commit is contained in:
parent
6728ba94b3
commit
a88432cc28
1 changed files with 1 additions and 0 deletions
|
|
@ -135,6 +135,7 @@ class PermissionAdmin(admin.ModelAdmin):
|
|||
if gfk.fk_field == db_field.name:
|
||||
kwargs['widget'] = GenericForeignKeyRawIdWidget(
|
||||
gfk.ct_field, self.admin_site._registry.keys())
|
||||
break
|
||||
return super(PermissionAdmin, self).formfield_for_dbfield(db_field, **kwargs)
|
||||
|
||||
def queryset(self, request):
|
||||
|
|
|
|||
Loading…
Reference in a new issue