Skip to content

Commit

Permalink
Update to code and temp commenting out of tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveScorfield committed Sep 6, 2024
1 parent 6e0fbc9 commit c9bd2ab
Show file tree
Hide file tree
Showing 4 changed files with 263 additions and 263 deletions.
4 changes: 2 additions & 2 deletions ras_party/unified_buisness_party_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ def get_respondents_associations(respondents):

def get_attributes_for_collection_exercise(model_attributes, collection_exercise_id=None):
if collection_exercise_id:
for attributes in model_attributes:
for attributes in model_attributes.attributes:
if attributes.collection_exercise == collection_exercise_id:
return attributes

try:
return next((attributes for attributes in model_attributes if attributes.collection_exercise))
return next((attributes for attributes in model_attributes.attributes if attributes.collection_exercise))
except StopIteration:
logger.error("No active attributes for business", reference=model_attributes.business_ref, status=400)
raise BadRequest("Business with reference does not have any active attributes.")
Loading

0 comments on commit c9bd2ab

Please sign in to comment.