Skip to content

Improve email invitation#1609

Open
CalamityC wants to merge 4 commits into
2.4.5/releasefrom
2.4.5/improve-email-invitation
Open

Improve email invitation#1609
CalamityC wants to merge 4 commits into
2.4.5/releasefrom
2.4.5/improve-email-invitation

Conversation

@CalamityC
Copy link
Copy Markdown
Collaborator

Add PROJECT_INVITE_USE_PROJECT_SITE setting and use it in get_invite_email_project_path (#1596)

Description

Related issue: #1596

Motivation and Context

How has this been tested?

Locally

Screenshots (if appropriate)

@CalamityC CalamityC marked this pull request as ready for review May 12, 2026 12:52
@CalamityC CalamityC requested review from MyPyDavid and jochenklar May 12, 2026 12:55
settings.MULTISITE = True
settings.PROJECT_INVITE_USE_PROJECT_SITE = True

invite = Invite.objects.get(pk=1)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No, wait. So before you were testing that when the foo-user from foo.com receives an invite for a Project of example.com that he receives the invite url for example.com, right?!
This invite = Invite.objects.get(pk=1) does not test for that :p

I meant that you can just do this instead of using get_or_create:

foo_site = Site.objects.get(domain='foo.com')
foo_user = get_user_model().objects.get(username='foo-user')

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The test before failed. So I pushed a test that I think should pass.
I'll have a look and try your suggestion.

@coveralls
Copy link
Copy Markdown

coveralls commented May 12, 2026

Coverage Status

Coverage is 94.915%2.4.5/improve-email-invitation into 2.4.5/release. No base build found for 2.4.5/release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants