Compare commits
2 Commits
21ac4a8c06
...
46a94c9688
Author | SHA1 | Date | |
---|---|---|---|
46a94c9688 | |||
3450f7475a |
@ -376,6 +376,12 @@ def auto_apply_template_structure(sender, instance, created, **kwargs):
|
|||||||
If there are nested sub-storages these will be added when the sub-storages
|
If there are nested sub-storages these will be added when the sub-storages
|
||||||
are created automatically.
|
are created automatically.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
# Skip recursion if the model is saved 'raw' e.g. when imported
|
||||||
|
if 'raw' in kwargs:
|
||||||
|
if kwargs['raw']:
|
||||||
|
return
|
||||||
|
|
||||||
if created:
|
if created:
|
||||||
if instance.template:
|
if instance.template:
|
||||||
for sub_storage in instance.template.storage_set.all():
|
for sub_storage in instance.template.storage_set.all():
|
||||||
|
Loading…
Reference in New Issue
Block a user