[extensions-web] upload: Don't fallback to a generated UUID
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web] upload: Don't fallback to a generated UUID
- Date: Sat, 3 Mar 2012 02:46:06 +0000 (UTC)
commit 3d8ea924a8b5b2986af33dfd2da76eed3ba2c8e7
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon Feb 27 17:39:42 2012 -0500
upload: Don't fallback to a generated UUID
sweettooth/extensions/models.py | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/sweettooth/extensions/models.py b/sweettooth/extensions/models.py
index c76018a..63042ef 100644
--- a/sweettooth/extensions/models.py
+++ b/sweettooth/extensions/models.py
@@ -4,7 +4,6 @@ try:
except ImportError:
import simplejson as json
-import uuid
from zipfile import ZipFile, BadZipfile
from django.core.urlresolvers import reverse
@@ -377,7 +376,7 @@ class ExtensionVersion(models.Model):
self.extension.name = metadata.pop('name', "")
self.extension.description = metadata.pop('description', "")
self.extension.url = metadata.pop('url', "")
- self.extension.uuid = metadata.pop('uuid', str(uuid.uuid1()))
+ self.extension.uuid = metadata['uuid']
self.extension.save()
# Due to Django ORM magic and stupidity, this is unfortunately necessary
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]