Make uuid look like a uuid.
If we really have to create a visible uuid (for a slug in this case), don't try to hide the fact that it is a uuid. So format it like a uuid.
This commit is contained in:
parent
adf53036a5
commit
f96c284e0a
@ -273,7 +273,7 @@ def unique_collections_slug(db):
|
|||||||
existing_slugs[row.creator].append(row.slug)
|
existing_slugs[row.creator].append(row.slug)
|
||||||
|
|
||||||
for row_id in slugs_to_change:
|
for row_id in slugs_to_change:
|
||||||
new_slug = uuid.uuid4().hex
|
new_slug = unicode(uuid.uuid4())
|
||||||
db.execute(collection_table.update().
|
db.execute(collection_table.update().
|
||||||
where(collection_table.c.id == row_id).
|
where(collection_table.c.id == row_id).
|
||||||
values(slug=new_slug))
|
values(slug=new_slug))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user