add amo_file_id to prepare for updating amo status per version

This commit is contained in:
Piotr Zalewa 2011-09-05 12:30:09 +01:00
Родитель e6edf680a5
Коммит 55f982786f
2 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -138,6 +138,8 @@ class PackageRevision(BaseModel):
amo_status = models.IntegerField(blank=True, null=True)
#: version name used to upload to AMO
amo_version_name = models.CharField(max_length=250, blank=True, null=True)
#: AMO file ID used to identify version
amo_file_id = models.IntegerField(blank=True, null=True)
#: Libraries on which current package depends
dependencies = models.ManyToManyField('self', blank=True, null=True,
@ -220,6 +222,7 @@ class PackageRevision(BaseModel):
# XXX: AMO's response should contain status
#self.amo_status = response['status']
self.amo_status = STATUS_UNREVIEWED
self.amo_file_id = response['id']
super(PackageRevision, self).save()
# TODO: update jetpack ID if needed
else:

Просмотреть файл

@ -0,0 +1 @@
ALTER TABLE `jetpack_packagerevision` ADD `amo_file_id` INTEGER DEFAULT NULL;