Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI error introduced since Django 4.1 #1093

Merged
merged 1 commit into from
Aug 8, 2022

Conversation

PIG208
Copy link
Contributor

@PIG208 PIG208 commented Aug 8, 2022

I have made things!

This fixes the CI starting occur on #1086 and following PRs due to the release of Django 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 django/django#15318.

Related issues

@PIG208 PIG208 force-pushed the ci-failure branch 2 times, most recently from c2a68e3 to 4107215 Compare August 8, 2022 19:52
This fixes the CI starting occur on typeddjango#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 django/django#15318.
@PIG208 PIG208 changed the title Fix CI error introduced in Django 4.1 Fix CI error introduced since Django 4.1 Aug 8, 2022
Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good one 😆

@sobolevn sobolevn merged commit db1edee into typeddjango:master Aug 8, 2022
@PIG208 PIG208 deleted the ci-failure branch August 8, 2022 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants