Skip to content

Commit

Permalink
remove redundant check
Browse files Browse the repository at this point in the history
  • Loading branch information
bernt-matthias committed Sep 19, 2024
1 parent 0ed4b48 commit 701f6ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/galaxy/managers/quotas.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def rename_quota(self, quota, params) -> str:
stmt = select(Quota).where(and_(Quota.name == params.name, Quota.id != quota.id)).limit(1)
if not params.name:
raise ActionInputError("Enter a valid name.")
elif params.name != quota.name and self.sa_session.scalars(stmt).first():
elif self.sa_session.scalars(stmt).first():
raise ActionInputError("A quota with that name already exists.")
else:
old_name = quota.name
Expand Down

0 comments on commit 701f6ab

Please sign in to comment.