Returns a single object matching the given keyword arguments, `None` otherwise.
(self, *args, **kwargs)
| 92 | |
| 93 | class BaseQuerySet(models.QuerySet): |
| 94 | def get_or_none(self, *args, **kwargs): |
| 95 | """ |
| 96 | Returns a single object matching the given keyword arguments, `None` otherwise. |
| 97 | """ |
| 98 | with suppress(self.model.DoesNotExist, ValidationError): |
| 99 | return self.get(*args, **kwargs) |
| 100 | |
| 101 | def paginated(self, per_page=5000): |
| 102 | """ |
no test coverage detected