Skip to content

Commit

Permalink
Merge pull request #516 from ehallein/master
Browse files Browse the repository at this point in the history
bugfix: failed import due to cast to int
  • Loading branch information
ehallein authored Nov 14, 2023
2 parents b5ffb6a + 5113615 commit 62ff6e2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion observations/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ class TurtleNestEncounterFilter(FilterSet):
field_name="nest_type",
choices=(
("successful-crawl", "Track with nest"),
("false-crawl", "Track without nest"),
("false-crawl", "Track without nest (false crawl)"),
("track-not-assessed", "Track, not checked for nest"),
("nest", "Nest, unhatched, no track"),
("hatched-nest", "Nest, hatched"),
Expand Down
6 changes: 3 additions & 3 deletions observations/odk.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,9 @@ def import_turtle_track_or_nest(form_id="turtle_track_or_nest", auth_headers=Non

emergence_obs = TurtleHatchlingEmergenceObservation(
encounter=encounter,
bearing_to_water_degrees=int(fan['bearing_to_water_manual']) if fan['bearing_to_water_manual'] else None,
bearing_leftmost_track_degrees=int(fan['leftmost_track_manual']) if fan['leftmost_track_manual'] else None,
bearing_rightmost_track_degrees=int(fan['rightmost_track_manual']) if fan['rightmost_track_manual'] else None,
bearing_to_water_degrees=float(fan['bearing_to_water_manual']) if fan['bearing_to_water_manual'] else None,
bearing_leftmost_track_degrees=float(fan['leftmost_track_manual']) if fan['leftmost_track_manual'] else None,
bearing_rightmost_track_degrees=float(fan['rightmost_track_manual']) if fan['rightmost_track_manual'] else None,
no_tracks_main_group=int(fan['no_tracks_main_group']) if fan['no_tracks_main_group'] else None,
no_tracks_main_group_min=int(fan['no_tracks_main_group_min']) if fan['no_tracks_main_group_min'] else None,
no_tracks_main_group_max=int(fan['no_tracks_main_group_max']) if fan['no_tracks_main_group_max'] else None,
Expand Down
2 changes: 1 addition & 1 deletion wastd/templates/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<a class="dropdown-item" href="{% url 'observations:turtlenestencounter-list' %}?encounter_type=tracks&nest_type=false-crawl"
title="Browse tracks without nests">
<i class="fa-solid fa-table" aria-hidden="true"></i>
Tracks without nests
Tracks without nests (false crawl)
</a>
<a class="dropdown-item" href="{% url 'observations:turtlenestencounter-list' %}?encounter_type=nest&disturbance=present"
title="Browse disturbed or predated nests">
Expand Down

0 comments on commit 62ff6e2

Please sign in to comment.