diff options
author | xray7224 <jessica@megworld.co.uk> | 2013-09-02 16:22:24 +0100 |
---|---|---|
committer | Jessica Tallon <jessica@megworld.co.uk> | 2014-07-22 23:13:14 +0100 |
commit | d461fbe5cb20ed56c3c1e3696464c3d323e5b4b0 (patch) | |
tree | f0b578608221346587e34ca78f5821c6b6625fd7 /mediagoblin/db/models.py | |
parent | 5b014a08661f718bd92971e71d173a0ea4b62c40 (diff) | |
download | mediagoblin-d461fbe5cb20ed56c3c1e3696464c3d323e5b4b0.tar.lz mediagoblin-d461fbe5cb20ed56c3c1e3696464c3d323e5b4b0.tar.xz mediagoblin-d461fbe5cb20ed56c3c1e3696464c3d323e5b4b0.zip |
Use the the slug as the UUID instead of a newly generated UUID
Diffstat (limited to 'mediagoblin/db/models.py')
-rw-r--r-- | mediagoblin/db/models.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/mediagoblin/db/models.py b/mediagoblin/db/models.py index 925f0d24..ca4efdd1 100644 --- a/mediagoblin/db/models.py +++ b/mediagoblin/db/models.py @@ -236,11 +236,6 @@ class NonceTimestamp(Base): nonce = Column(Unicode, nullable=False, primary_key=True) timestamp = Column(DateTime, nullable=False, primary_key=True) - -def create_uuid(): - """ Creates a new uuid which is suitable for use in a URL """ - return base64.urlsafe_b64encode(uuid.uuid4().bytes).strip("=") - class MediaEntry(Base, MediaEntryMixin): """ TODO: Consider fetching the media_files using join @@ -445,7 +440,7 @@ class MediaEntry(Base, MediaEntryMixin): id = request.urlgen( "mediagoblin.federation.object", objectType=self.objectType, - uuid=self.uuid, + uuid=self.slug, qualified=True ) |