sensible fix for pet names

and automoderation for pet names
This commit is contained in:
Aaron Kimbre
2022-02-12 21:37:11 -06:00
parent d63dd807e3
commit 78ed39905f
3 changed files with 62 additions and 31 deletions

View File

@@ -584,17 +584,9 @@ class PetNames(db.Model):
owner_id = db.Column(
mysql.BIGINT,
db.ForeignKey(CharacterInfo.id, ondelete='CASCADE'),
nullable=True
)
owner = db.relationship(
'CharacterInfo',
foreign_keys=[owner_id],
backref="pet_owner",
passive_deletes=True
)
def save(self):
db.session.add(self)
db.session.commit()