add 4 new relation signales, add 4 new aggr methods, wip to cleanup

This commit is contained in:
collerek
2021-03-12 12:13:08 +01:00
parent 0ae340100e
commit ff9d412508
15 changed files with 701 additions and 33 deletions

View File

@ -216,6 +216,8 @@ class NewBaseModel(pydantic.BaseModel, ModelTableProxy, metaclass=ModelMetaclass
)
if isinstance(object.__getattribute__(self, "__dict__").get(name), list):
# virtual foreign key or many to many
# TODO: Fix double items in dict, no effect on real action ugly repr
# if model.pk not in [x.pk for x in related_list]:
object.__getattribute__(self, "__dict__")[name].append(model)
else:
# foreign key relation