Skip to content

Commit

Permalink
Update django-invitations requirement from <1.9.4 to <2.0.1 (#10084) (#…
Browse files Browse the repository at this point in the history
…10097)

* Update django-invitations requirement from <1.9.4 to <2.0.1

Updates the requirements on [django-invitations](https://github.com/jazzband/django-invitations) to permit the latest version.
- [Release notes](https://github.com/jazzband/django-invitations/releases)
- [Changelog](https://github.com/jazzband/django-invitations/blob/master/CHANGELOG.md)
- [Commits](jazzband/django-invitations@0.1...2.0.0)

---
updated-dependencies:
- dependency-name: django-invitations
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* - fix the adapter

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: afabiani <alessio.fabiani@geosolutionsgroup.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: afabiani <alessio.fabiani@geosolutionsgroup.com>
  • Loading branch information
3 people committed Oct 10, 2022
1 parent d200192 commit 9225322
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion geonode/people/adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,12 @@ def populate_username(self, request, user):
user_username(user, safe_username)

def send_invitation_email(self, email_template, email, context):
self.send_mail(email_template, email, context)

def send_mail(self, template_prefix, email, context):
enh_context = self.enhanced_invitation_context(context)
self.send_mail(email_template, email, enh_context)
msg = self.render_mail(template_prefix, email, enh_context)
msg.send()

def enhanced_invitation_context(self, context):
user = context.get("inviter") if context.get("inviter") else context.get("user")
Expand Down
2 changes: 1 addition & 1 deletion geonode/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -1990,7 +1990,7 @@ def get_geonode_catalogue_service():
}

INVITATIONS_ADAPTER = ACCOUNT_ADAPTER

INVITATIONS_CONFIRMATION_URL_NAME = "geonode.invitations:accept-invite"

# Choose thumbnail generator -- this is the default generator
THUMBNAIL_GENERATOR = os.environ.get(
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ django-select2==7.10.1
django-floppyforms<1.10.0
django-forms-bootstrap<=3.1.0
django-autocomplete-light==3.5.1
django-invitations<1.9.4
django-invitations<2.0.1
django-recaptcha==3.0.0

# REST
Expand Down

0 comments on commit 9225322

Please sign in to comment.