From cff94a12eecbeeebd1d5ee0079d660518170c910 Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Tue, 22 Feb 2022 01:12:02 +0300 Subject: [PATCH] Set a few gamedata relations view-only New sqlalchemy complains about them, and we never set them via those relations anyway --- eos/db/gamedata/dynamicAttributes.py | 2 +- eos/db/gamedata/item.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/eos/db/gamedata/dynamicAttributes.py b/eos/db/gamedata/dynamicAttributes.py index 26d25be0e..a262d3af4 100644 --- a/eos/db/gamedata/dynamicAttributes.py +++ b/eos/db/gamedata/dynamicAttributes.py @@ -51,7 +51,7 @@ mapper(DynamicItemAttribute, dynamicAttributes_table, properties={"info": relation(AttributeInfo, lazy=False)}) mapper(DynamicItemItem, dynamicApplicable_table, properties={ - "mutaplasmid": relation(DynamicItem), + "mutaplasmid": relation(DynamicItem, viewonly=True), }) DynamicItemAttribute.ID = association_proxy("info", "attributeID") diff --git a/eos/db/gamedata/item.py b/eos/db/gamedata/item.py index fd6b11789..1d515b805 100644 --- a/eos/db/gamedata/item.py +++ b/eos/db/gamedata/item.py @@ -69,7 +69,8 @@ props = { primaryjoin=dynamicApplicable_table.c.applicableTypeID == items_table.c.typeID, secondaryjoin=dynamicApplicable_table.c.typeID == DynamicItem.typeID, secondary=dynamicApplicable_table, - backref="applicableItems" + backref="applicableItems", + viewonly=True ) }