Removed unnecessary parens in _get_app_label_and_model_name().

This commit is contained in:
Mariusz Felisiak 2017-09-10 21:26:06 +02:00
parent a599ae6018
commit a4092af3d3
No known key found for this signature in database
GPG Key ID: 2EF56372BA48CD1B
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ from .exceptions import InvalidBasesError
def _get_app_label_and_model_name(model, app_label=''): def _get_app_label_and_model_name(model, app_label=''):
if isinstance(model, str): if isinstance(model, str):
split = model.split('.', 1) split = model.split('.', 1)
return (tuple(split) if len(split) == 2 else (app_label, split[0])) return tuple(split) if len(split) == 2 else (app_label, split[0])
else: else:
return model._meta.app_label, model._meta.model_name return model._meta.app_label, model._meta.model_name