aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2013-01-23 15:15:22 -0600
committerChristopher Allan Webber <cwebber@dustycloud.org>2013-01-23 15:15:22 -0600
commit266b42b3dc7697801f726875e1a734b9e4ba7dc9 (patch)
treeb38b45627b24031582522e8028267322ad9382fa
parent985871095e873aca1e160a7eea4ad97f4b80de18 (diff)
downloadmediagoblin-266b42b3dc7697801f726875e1a734b9e4ba7dc9.tar.lz
mediagoblin-266b42b3dc7697801f726875e1a734b9e4ba7dc9.tar.xz
mediagoblin-266b42b3dc7697801f726875e1a734b9e4ba7dc9.zip
Switching uuid4()[1:4] -> uuid4().hex[:4]
.hex is what we need to access to get at the ascii (hex) version anyway. Also, not sure why the previous version grabbed starting at the index of 1... just grab the first characters instead.
-rw-r--r--mediagoblin/db/mixin.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mediagoblin/db/mixin.py b/mediagoblin/db/mixin.py
index 0e000324..c4c508a4 100644
--- a/mediagoblin/db/mixin.py
+++ b/mediagoblin/db/mixin.py
@@ -111,7 +111,7 @@ class MediaEntryMixin(object):
# let's whack junk on there till it's unique.
self.slug += '-'
while check_media_slug_used(self.uploader, self.slug, self.id):
- self.slug += uuid4()[1:4]
+ self.slug += uuid4().hex[:4]
@property
def description_html(self):