mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-15 00:07:09 +08:00
This fixes the CI starting occur on #1086 and following PRs due to the release of Django 4.1 (https://docs.djangoproject.com/en/4.1/releases/4.1/) which shipped the change # Even if this relation is not to pk, we require still pk value. # The wish is that the instance has been already saved to DB, # although having a pk value isn't a guarantee of that. if self.instance.pk is None: raise ValueError( f"{instance.__class__.__name__!r} instance needs to have a primary " f"key value before this relationship can be used." ) in https://github.com/django/django/pull/15318.