Skip to content

Commit

Permalink
fix the codacy stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon committed Sep 16, 2019
1 parent 6a21b11 commit 82298fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion observation_portal/observations/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ def update(self, instance, validated_data):
)
num_canceled = Observation.cancel(observations)
logger.info(
"updated end time for observation {instance.id} to {instance.end}. Canceled {num_canceled} overlapping observations.")
f"updated end time for observation {instance.id} to {instance.end}. Canceled {num_canceled} overlapping observations.")
cache.set('observation_portal_last_change_time', timezone.now(), None)

return instance
Expand Down
4 changes: 2 additions & 2 deletions observation_portal/observations/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,8 @@ class TestUpdateObservationApi(TestObservationApiBase):
def setUp(self):
super().setUp()

def _create_clone_observation(self, observation, start, end):
@staticmethod
def _create_clone_observation(observation, start, end):
return mixer.blend(
Observation,
site=observation.site,
Expand All @@ -978,7 +979,6 @@ def test_update_observation_end_time_succeeds(self):
self.assertEqual(observation.end, new_end)

def test_update_observation_end_time_cancels_proper_overlapping_observations(self):
original_end = datetime(2016, 9, 2, 23, 35, 40).replace(tzinfo=timezone.utc)
self.window.start = datetime(2016, 9, 1, tzinfo=timezone.utc)
self.window.save()
observation = self._generate_observation_data(
Expand Down

0 comments on commit 82298fb

Please sign in to comment.