Skip to content

Commit

Permalink
fix select_one_project_allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
claire-peters committed Aug 14, 2024
1 parent ae835ab commit 1aa8fb9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions coldfront/core/utils/fasrc.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ def select_one_project_allocation(project_obj, resource_obj, dirpath=None):
allocation_query = project_obj.allocation_set.filter(**filter_vals)
if allocation_query.count() == 1:
allocation_obj = allocation_query.first()
if allocation_obj.subdirectory and allocation_obj.subdirectory != dirpath:
logger.error("directory path mismatch:", allocation_obj.subdirectory, dirpath)
if allocation_obj.path and allocation_obj.path != dirpath:
logger.error("directory path mismatch:", allocation_obj.path, dirpath)
elif allocation_query.count() < 1:
allocation_obj = None
elif allocation_query.count() > 1:
Expand Down

0 comments on commit 1aa8fb9

Please sign in to comment.