Browse Source

Should fix

master
Dashie der otter 3 years ago
parent
commit
f91511358e
2 changed files with 5 additions and 1 deletions
  1. 4
    0
      models.py
  2. 1
    1
      stockazng.py

+ 4
- 0
models.py View File

@@ -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)
)

+ 1
- 1
stockazng.py View File

@@ -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__':