Skip to content

Commit

Permalink
Remove optional typing hint, rename helper function
Browse files Browse the repository at this point in the history
  • Loading branch information
J4bbi authored and cc-a committed Dec 9, 2024
1 parent b5cb3ec commit 0971f69
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions site/ic_data_repo/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from invenio_oauthclient.views.client import auto_redirect_login

from .custom_fields import * # noqa: F401,F403
from .utils import get_user
from .utils import get_user_form_default

# Flask
# =====
Expand Down Expand Up @@ -114,7 +114,7 @@
}
],
"publisher": "Imperial College London",
"creators": lambda: get_user(),
"creators": lambda: get_user_form_default(),
}

# See:
Expand Down
4 changes: 2 additions & 2 deletions site/ic_data_repo/config/utils.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
"""Utilities for settings."""

from typing import Any, List, Optional
from typing import Any, List

from flask_login import current_user


def get_user() -> Optional[List[dict[str, Any]]]:
def get_user_form_default() -> List[dict[str, Any]]:
"""Format the current user profile for the submission form.
The default user profile schema has two string properties;
Expand Down

0 comments on commit 0971f69

Please sign in to comment.