diff --git a/tests/modeltests/custom_methods/models.py b/tests/modeltests/custom_methods/models.py index 208adc20a3..3fdefca6bf 100644 --- a/tests/modeltests/custom_methods/models.py +++ b/tests/modeltests/custom_methods/models.py @@ -18,7 +18,7 @@ class Article(models.Model): return self.pub_date == datetime.date.today() def get_articles_from_same_day_1(self): - return Article.objects.filter(id__ne=self.id, pub_date__exact=self.pub_date) + return Article.objects.filter(pub_date=self.pub_date).exclude(id=self.id) def get_articles_from_same_day_2(self): """