djeuscan: fix alive / packaged updates

Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
This commit is contained in:
Corentin Chary 2012-06-04 10:28:06 +02:00
parent 83f5df4daf
commit 5b1884ead7
2 changed files with 5 additions and 5 deletions

View File

@ -207,7 +207,7 @@ class ScanPortage(object):
overlay=overlay, overlay=overlay,
defaults={"alive": True, "packaged": True} defaults={"alive": True, "packaged": True}
) )
if not created: if not created: # Created objects have defaults values
obj.alive = True obj.alive = True
obj.packaged = True obj.packaged = True
obj.save() obj.save()

View File

@ -57,7 +57,7 @@ class ScanUpstream(object):
def store_version(self, package, ver, url): def store_version(self, package, ver, url):
obj, created = Version.objects.get_or_create( obj, created = Version.objects.get_or_create(
package=package, slot='', revision='r0', version=ver, overlay='', package=package, slot='', revision='r0', version=ver, overlay='',
defaults={"alive": True, "urls": url, "packaged": True} defaults={"alive": True, "urls": url, "packaged": False}
) )
if not created: if not created:
obj.alive = True obj.alive = True