fix permission parser

This commit is contained in:
Matthias 2021-11-01 22:23:51 +01:00
parent 6dead88028
commit 3e3da8b2d1
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -279,13 +279,13 @@ class RuleSet(models.Model):
def split_model(model): def split_model(model):
"""get modelname and app from modelstring""" """get modelname and app from modelstring"""
app, *model = model.split('_') *app, model = model.split('_')
# handle models that have # handle models that have
if len(model) > 1: if len(app) > 1:
model = '_'.join(model) app = '_'.join(app)
else: else:
model = model[0] app = app[0]
return model, app return model, app