-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* WIP modify fields based on sci feedback * add adaf footnote to assessment detail and value detail templates * lint * fix imports * update yaml * Edit ADAF display * change table column order and change to info icon * Add changes from meeting feedback * adjust help texts * wip * update adaf help text and footnote * textual and layout updates * ruff --------- Co-authored-by: Andy Shapiro <shapiromatron@gmail.com>
- Loading branch information
1 parent
7251765
commit 06e2448
Showing
17 changed files
with
193 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
hawc/apps/assessment/migrations/0035_update_assessmentvalue.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Generated by Django 3.2.18 on 2023-02-27 20:55 | ||
|
||
|
||
from django.db import migrations, models | ||
|
||
|
||
def get_species_name(apps, schema_editor): | ||
AssessmentValue = apps.get_model("assessment", "AssessmentValue") | ||
Species = apps.get_model("assessment", "Species") | ||
updates = [] | ||
for obj in AssessmentValue.objects.exclude(species_studied=""): | ||
obj.species_studied = Species.objects.get(pk=int(obj.species_studied)).name | ||
updates.append(obj) | ||
if updates: | ||
AssessmentValue.objects.bulk_update(updates, ["species_studied"]) | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("assessment", "0034_assessmentdetail_assessmentvalue"), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name="assessmentvalue", | ||
name="non_adaf_value", | ||
), | ||
migrations.AlterField( | ||
model_name="assessmentvalue", | ||
name="adaf", | ||
field=models.BooleanField( | ||
default=False, | ||
help_text="When checked, the ADAF note will appear as a footnote for the value. Add supporting information about ADAF in the comments.", | ||
verbose_name="Apply ADAF?", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="assessmentvalue", | ||
name="duration", | ||
field=models.CharField( | ||
blank=True, | ||
help_text="Duration associated with the value (e.g., Chronic, Subchronic)", | ||
max_length=128, | ||
verbose_name="Value duration", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="assessmentvalue", | ||
name="species_studied", | ||
field=models.TextField( | ||
blank=True, | ||
default="", | ||
help_text="Provide information about the animal(s) studied, including species and strain information", | ||
verbose_name="Species and strain", | ||
), | ||
preserve_default=False, | ||
), | ||
migrations.RunPython(get_species_name, migrations.RunPython.noop), | ||
migrations.AlterField( | ||
model_name="assessmentdetail", | ||
name="report_id", | ||
field=models.CharField( | ||
blank=True, | ||
help_text="A external report number or identifier (e.g., a DOI, publication number)", | ||
max_length=128, | ||
verbose_name="Report identifier", | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.