Skip to content

Commit

Permalink
Merge pull request #225 from nossas/hotfix/bonde-auth
Browse files Browse the repository at this point in the history
fix(vote): keep base authenticate backend config on settings
  • Loading branch information
igr-santos authored Jul 11, 2024
2 parents 0a4a6e5 + 342b387 commit c6052d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/contrib/bonde/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,14 +336,14 @@ class BondeBasePluginModel(CMSPlugin):
class Meta:
abstract = True

def get_widget(self) -> Widget | None:
def get_widget(self):
if not self.reference_id:
return None

return Widget.objects.get(id=self.reference_id)

@property
def widget(self) -> Widget | None:
def widget(self):
return self.get_widget()


Expand Down
4 changes: 2 additions & 2 deletions app/votepeloclima/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@
ROOT_URLCONF = "votepeloclima.urls"


AUTHENTICATION_BACKENDS = (
AUTHENTICATION_BACKENDS = [
'contrib.oauth.backends.OAuthBackend',
'django.contrib.auth.backends.ModelBackend',
)
] + AUTHENTICATION_BACKENDS

# Static files

Expand Down

0 comments on commit c6052d4

Please sign in to comment.