Browse Source

Should fix

master
squeaky otter 6 years ago
parent
commit
f91511358e
  1. 4
      models.py
  2. 2
      stockazng.py

4
models.py

@ -518,6 +518,10 @@ def gen_tags_slug(mapper, connection, target):
for i in target.tags:
slugs += i.name
slugs += " "
if slugs == "":
slugs = "untagged"
connection.execute(
Part.__table__.update().where(Part.__table__.c.id == target.id).values(tags_slug=slugs)
)

2
stockazng.py

@ -329,7 +329,7 @@ def tags_untag():
if len(i.tags) <= 0:
i.tags_slug = "untagged"
db.session.commit()
manager.add_command('db', MigrateCommand)
if __name__ == '__main__':