mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-04 18:23:29 +02:00
fixed bug in test_if_more_than_one_join
This commit is contained in:
parent
185c1f0cb6
commit
3499cc3ba0
1 changed files with 1 additions and 1 deletions
|
@ -107,7 +107,7 @@ class RegistrarFormSet(forms.BaseFormSet):
|
||||||
|
|
||||||
# Raise a KeyError if rel is not a defined field on the db_obj model
|
# Raise a KeyError if rel is not a defined field on the db_obj model
|
||||||
# This will help catch any errors in reverse_join config on forms
|
# This will help catch any errors in reverse_join config on forms
|
||||||
if rel not in db_obj._meta.get_all_field_names():
|
if rel not in [field.name for field in db_obj._meta.get_fields()]:
|
||||||
raise KeyError(f"{rel} is not a defined field on the {db_obj._meta.model_name} model.")
|
raise KeyError(f"{rel} is not a defined field on the {db_obj._meta.model_name} model.")
|
||||||
|
|
||||||
# if attr rel in db_obj is not None, then test if reference object(s) exist
|
# if attr rel in db_obj is not None, then test if reference object(s) exist
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue