mirror of
https://github.com/viq/NewsBlur.git
synced 2025-11-01 09:09:16 +00:00
Updating stories which give integrity errors.
This commit is contained in:
parent
2e95469ad9
commit
3c2ccd7e3c
1 changed files with 8 additions and 2 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue