Skip to content

Commit

Permalink
Format acquisition dates for correct display in preview table
Browse files Browse the repository at this point in the history
  • Loading branch information
NTaherifar committed Aug 22, 2024
1 parent 120e6c1 commit 8cd8b84
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ def prepare_samples_data(samples_df, authors_df, related_resources_df, funding_d
sample['parent_sample'] = sample['parent_sample']
sample['parent'] = ''

sample['acquisition_start_date'] = row['acquisition_start_date'].strftime('%Y-%m-%d') if pd.notnull(row['acquisition_start_date']) else None
sample['acquisition_end_date'] = row['acquisition_end_date'].strftime('%Y-%m-%d') if pd.notnull(row['acquisition_end_date']) else None

org = toolkit.get_action('organization_show')({}, {'id': org_id})
sample['owner_org'] = org_id
sample['sample_repository_contact_name'] = org.get('contact_name', 'test')
Expand Down

0 comments on commit 8cd8b84

Please sign in to comment.