Set a few gamedata relations view-only

New sqlalchemy complains about them, and we never set them via those relations anyway
This commit is contained in:
DarkPhoenix
2022-02-22 01:12:02 +03:00
parent da39975ba8
commit cff94a12ee
2 changed files with 3 additions and 2 deletions

View File

@@ -51,7 +51,7 @@ mapper(DynamicItemAttribute, dynamicAttributes_table,
properties={"info": relation(AttributeInfo, lazy=False)}) properties={"info": relation(AttributeInfo, lazy=False)})
mapper(DynamicItemItem, dynamicApplicable_table, properties={ mapper(DynamicItemItem, dynamicApplicable_table, properties={
"mutaplasmid": relation(DynamicItem), "mutaplasmid": relation(DynamicItem, viewonly=True),
}) })
DynamicItemAttribute.ID = association_proxy("info", "attributeID") DynamicItemAttribute.ID = association_proxy("info", "attributeID")

View File

@@ -69,7 +69,8 @@ props = {
primaryjoin=dynamicApplicable_table.c.applicableTypeID == items_table.c.typeID, primaryjoin=dynamicApplicable_table.c.applicableTypeID == items_table.c.typeID,
secondaryjoin=dynamicApplicable_table.c.typeID == DynamicItem.typeID, secondaryjoin=dynamicApplicable_table.c.typeID == DynamicItem.typeID,
secondary=dynamicApplicable_table, secondary=dynamicApplicable_table,
backref="applicableItems" backref="applicableItems",
viewonly=True
) )
} }