Skip to content

change(fastapi): unify all model relationship behavior

Kevin Morris requested to merge kevr/aurweb:model-flexibility into pu

Now, we allow the direct relationships and their foreign keys to be set in all of our models. Previously, we constrained this to direct relationships, and this forced users to perform a query in most situations to satisfy that requirement. Now, IDs can be passed directly.

Additionally, this change removes the need for extraneous imports when users which to use relationships. We now import and use models directly instead of passing string-references to them.

Signed-off-by: Kevin Morris kevr@0cost.org

Edited by Kevin Morris

Merge request reports

Loading