0.2.3 #99
1 changed files with 2 additions and 2 deletions
|
|
@ -188,13 +188,13 @@ class FeedDuplicateHandler:
|
|||
"publication_date": post.publication_date,
|
||||
}
|
||||
|
||||
for existing_post in self.queryset.order_by("-publication_date")[:50]:
|
||||
for existing_post in self.queryset.order_by("-publication_date")[:500]:
|
||||
if self.is_duplicate(existing_post, values):
|
||||
return True
|
||||
|
||||
def is_duplicate(self, existing_post: Post, values: Dict) -> bool:
|
||||
for key, value in values.items():
|
||||
existing_value = getattr(existing_post, key, object())
|
||||
existing_value = getattr(existing_post, key, None)
|
||||
if existing_value != value:
|
||||
return False
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue