Skip to content

Commit

Permalink
Update AAD Lib (#791)
Browse files Browse the repository at this point in the history
* update var and comment

* update aad lib version and remove username parameter in customUser manager

* copy updates
  • Loading branch information
mitchdawson1982 authored Sep 6, 2024
1 parent 3b64836 commit 63c3023
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
4 changes: 2 additions & 2 deletions core/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ def generate_cache_configuration() -> dict[str, Any]:

domain: str = ".".join(
os.environ.get("REDIS_PRIMARY_ENDPOINT_ADDRESS", "").split(".")[1:]
) # 'iwfvzo.euw2.cache.amazonaws.com'
) # 'cpf05ff2dca7d81952.iwfvzo.euw2.cache.amazonaws.com'

hosts: list[str] = json.loads(
os.environ.get("REDIS_MEMBER_CLUSTERS", "")
os.environ.get("REDIS_MEMBER_CLUSTERS", [])
) # ["cp-f05ff2dca7d81952-001","cp-f05ff2dca7d81952-002"]

for host in hosts:
Expand Down
8 changes: 4 additions & 4 deletions locale/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@ msgid ""
msgstr ""
"Project-Id-Version: Find MoJ data\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-09-05 19:37+0100\n"
"POT-Creation-Date: 2024-09-06 14:02+0100\n"
"Language: en\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: core/middleware.py:28
#: core/middleware.py:27
msgid "Catalogue service unavailable"
msgstr "Catalogue service unavailable"

#: core/middleware.py:35
#: core/middleware.py:34
msgid "Bad request"
msgstr "Bad request"

#: core/middleware.py:42
#: core/middleware.py:41
msgid "There is a problem with this service"
msgstr "There is a problem with this service"

Expand Down
8 changes: 4 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ markdown-headdown = "^0.1.3"
nltk = "^3.9.1"
sentry-sdk = { extras = ["django"], version = "^2.13.0" }
ministryofjustice-data-platform-catalogue = { path = "lib/datahub-client", develop = true }
django-azure-auth = "1.3.0"
django-azure-auth = "2.0.2"
django-waffle = "^4.1.0"
psycopg = "^3.2.1"
psycopg-binary = "^3.2.1"
Expand Down
3 changes: 1 addition & 2 deletions users/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@ class CustomUserManager(BaseUserManager):
for authentication instead of usernames.
"""

def create_user(self, username, email, **extra_fields):
def create_user(self, email, **extra_fields):
"""
Create and save a user with the given email and password.
"""
if not email:
raise ValueError(_("The Email must be set"))

username = username
email = self.normalize_email(email)
user = self.model(
email=email,
Expand Down

0 comments on commit 63c3023

Please sign in to comment.