Skip to content

Commit

Permalink
log whether we are in update mode
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarson committed Jan 25, 2024
1 parent 98512df commit 7f6ef98
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions primed/users/audit.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,10 @@ def audit_drupal_users(study_sites, json_api, apply_changes=False):
if sa:
user_sites_changed = drupal_adapter.update_user_study_sites(
user=sa.user,
extra_data={"study_site_or_center": drupal_user_study_site_shortnames},
apply_update=apply_changes
extra_data={
"study_site_or_center": drupal_user_study_site_shortnames
},
apply_update=apply_changes,
)
if user_changed or user_sites_changed and not is_new_user:
audit_results.add_update(data=user)
Expand Down
4 changes: 2 additions & 2 deletions primed/users/management/commands/sync-drupal-data.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def handle(self, *args, **options):
should_update = options.get("update")

user_audit_results = drupal_data_user_audit(apply_changes=should_update)
print(f"User Audit Results {user_audit_results}")
print(f"User Audit (Update: {should_update}) Results {user_audit_results}")
if user_audit_results.encountered_issues():
print(
user_audit_results.rows_by_result_type(
Expand All @@ -35,7 +35,7 @@ def handle(self, *args, **options):
)

site_audit_results = drupal_data_study_site_audit(apply_changes=should_update)
print(f"Site Audit Results {site_audit_results}")
print(f"Site Audit (Update: {should_update}) Results {site_audit_results}")
if site_audit_results.encountered_issues():
print(
site_audit_results.rows_by_result_type(
Expand Down

0 comments on commit 7f6ef98

Please sign in to comment.