Skip to content

Commit

Permalink
Merge pull request #607 from ODM2/HotFix_DeleteSitesWithData
Browse files Browse the repository at this point in the history
Hotfix for Deleting sites with data
  • Loading branch information
ptomasula authored May 5, 2022
2 parents 771915a + c0ef885 commit d0b3049
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dataloader/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class Meta:

@python_2_unicode_compatible
class ExtendedResult(models.Model):
result = models.OneToOneField('Result', db_column='resultid', on_delete=models.CASCADE, primary_key=True)
result = models.OneToOneField('Result', db_column='resultid', on_delete=models.DO_NOTHING, primary_key=True)
spatial_reference = models.ForeignKey('SpatialReference', db_column='spatialreferenceid', on_delete=models.CASCADE, blank=True, null=True)

def __str__(self):
Expand Down Expand Up @@ -1997,7 +1997,7 @@ class Meta:


class TimeSeriesResultValue(ResultValue, QualityControlComponent, TimeAggregationComponent):
result = models.ForeignKey('TimeSeriesResult', related_name='values', db_column='resultid', on_delete=models.CASCADE)
result = models.ForeignKey('TimeSeriesResult', related_name='values', db_column='resultid', on_delete=models.DO_NOTHING)
data_value = models.FloatField(db_column='datavalue')
annotations = models.ManyToManyField('Annotation', related_name='annotated_time_series_values',
through='TimeSeriesResultValueAnnotation')
Expand Down

0 comments on commit d0b3049

Please sign in to comment.