Skip to content

Commit

Permalink
fix: faults enabled bug, ~ does not flip boolean, changing to not
Browse files Browse the repository at this point in the history
  • Loading branch information
Lachlan Grose committed Jun 8, 2022
1 parent c63cae7 commit 0c68788
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions LoopStructural/modelling/features/_base_geological_feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def toggle_faults(self):
"""
logger.warning(f"Toggling faults for feature {self.name}")
self.faults_enabled = ~self.faults_enabled
self.faults_enabled = not self.faults_enabled

def add_region(self, region):
"""
Expand Down Expand Up @@ -104,4 +104,11 @@ def max(self):
return np.nanmax(self.evaluate_value(self.model.regular_grid((10, 10, 10))))

def __tojson__(self):
return {"name": self.name, "type": self.type}
regions = [r.name for r in self.regions]
faults = [f.name for f in self.faults]
return {
"name": self.name,
"type": self.type,
"regions": regions,
"faults": faults,
}

0 comments on commit 0c68788

Please sign in to comment.