Updating stories which give integrity errors.

This commit is contained in:
Samuel Clay 2013-11-15 10:38:03 -08:00
parent 2e95469ad9
commit 3c2ccd7e3c

View file

@ -938,11 +938,17 @@ class Feed(models.Model):
try:
s.save()
ret_values['new'] += 1
except (IntegrityError, OperationError), e:
except (OperationError), e:
ret_values['error'] += 1
if settings.DEBUG:
logging.info(' ---> [%-30s] ~SN~FRIntegrityError on new story: %s - %s' % (self.feed_title[:30], story.get('guid'), e))
elif existing_story and story_has_changed:
except IntegrityError, e:
existing_story, _ = MStory.find_story(self.pk,
story.get('guid'),
original_only=True)
story_has_changed = True
if existing_story and story_has_changed:
# update story
original_content = None
try: