fix model_class if model_name is not set
This commit is contained in:
parent
9fb4fe95bf
commit
5e14d11a46
1 changed files with 1 additions and 1 deletions
|
@ -384,7 +384,7 @@ class Change(models.Model):
|
|||
|
||||
@property
|
||||
def model_class(self) -> typing.Optional[typing.Type[models.Model]]:
|
||||
if self.model_name is None:
|
||||
if not self.model_name:
|
||||
return None
|
||||
return apps.get_model('mapdata', self.model_name)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue