refac
This commit is contained in:
1 parent
52ee5cb1b3
commit
54f31c630a
2 files changed
+4
-1
No files matched your search
@@ -718,6 +718,9 @@ async def update_model_by_id(
|
|||||||
db,
|
db,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if 'base_model_id' not in form_data.model_fields_set:
|
||||||
|
form_data.base_model_id = model.base_model_id
|
||||||
|
|
||||||
form_data.access_grants = await filter_allowed_access_grants(
|
form_data.access_grants = await filter_allowed_access_grants(
|
||||||
await Config.get('user.permissions'),
|
await Config.get('user.permissions'),
|
||||||
user.id,
|
user.id,
|
||||||
|
|||||||
@@ -345,7 +345,7 @@
|
|||||||
|
|
||||||
if (base_model) {
|
if (base_model) {
|
||||||
model.base_model_id = base_model.id;
|
model.base_model_id = base_model.id;
|
||||||
} else if (!(edit && model.base_model_id === model.id)) {
|
} else if (!edit) {
|
||||||
model.base_model_id = null;
|
model.base_model_id = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user