[extensions-web] Update the metadata.json files for an extension when we change the data
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web] Update the metadata.json files for an extension when we change the data
- Date: Tue, 8 Nov 2011 17:25:25 +0000 (UTC)
commit c56fd76e9e4ff117705377f39b3c18bb3b11f02f
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Nov 8 12:00:13 2011 -0500
Update the metadata.json files for an extension when we change the data
sweettooth/extensions/models.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/sweettooth/extensions/models.py b/sweettooth/extensions/models.py
index 207ae71..54d275b 100644
--- a/sweettooth/extensions/models.py
+++ b/sweettooth/extensions/models.py
@@ -97,6 +97,12 @@ class Extension(models.Model):
if not validate_uuid(self.uuid):
raise ValidationError("Invalid UUID")
+ def save(self, *args, **kwargs):
+ super(Extension, self).save(*args, **kwargs)
+ for version in self.versions.all():
+ if version.source:
+ version.replace_metadata_json()
+
class InvalidShellVersion(Exception):
pass
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]