Skip to content

Commit

Permalink
Merge branch 'dev' into styling-registration-page
Browse files Browse the repository at this point in the history
  • Loading branch information
i-oden authored Apr 4, 2022
2 parents dbf06a8 + 3a16fa0 commit 7e267e6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,4 @@ Please add a _short_ line describing the PR you make, if the PR implements a spe
- Add link in navbar to the installation documentation ([#1112](https://github.com/ScilifelabDataCentre/dds_web/pull/1112))
- Change from apscheduler to flask-apscheduler - solves the app context issue ([#1109](https://github.com/ScilifelabDataCentre/dds_web/pull/1109))
- Send an email to all Unit Admins when a Unit Admin has reset their password ([#1110](https://github.com/ScilifelabDataCentre/dds_web/pull/1110)).
- Patch: Add check for unanswered invite when creating project and adding user who is already invited ([#1117](https://github.com/ScilifelabDataCentre/dds_web/pull/1117))
5 changes: 3 additions & 2 deletions dds_web/api/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,7 @@ def post(self):
for user in p_info["users_to_add"]:
try:
existing_user = user_schemas.UserSchema().load(user)
unanswered_invite = user_schemas.UnansweredInvite().load(user)
except (
marshmallow.exceptions.ValidationError,
sqlalchemy.exc.OperationalError,
Expand All @@ -673,7 +674,7 @@ def post(self):
user_addition_statuses.append(addition_status)
continue

if not existing_user:
if not existing_user and not unanswered_invite:
# Send invite if the user doesn't exist
invite_user_result = AddUser.invite_user(
email=user.get("email"),
Expand All @@ -694,7 +695,7 @@ def post(self):
addition_status = ""
try:
add_user_result = AddUser.add_to_project(
whom=existing_user,
whom=existing_user or unanswered_invite,
project=new_project,
role=user.get("role"),
)
Expand Down
2 changes: 1 addition & 1 deletion dds_web/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class Config(object):
MAIL_PASSWORD = os.environ.get("MAIL_PASSWORD", "")
MAIL_USE_TLS = False
MAIL_USE_SSL = False
MAIL_DEFAULT_SENDER = "dds@noreply.se"
MAIL_DEFAULT_SENDER = ("SciLifeLab DDS", "dds@example.com")

TOKEN_ENDPOINT_ACCESS_LIMIT = "10/hour"
RATELIMIT_STORAGE_URI = os.environ.get(
Expand Down
12 changes: 6 additions & 6 deletions dds_web/static/package-lock.json

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

0 comments on commit 7e267e6

Please sign in to comment.