Skip to content

Commit

Permalink
Don't serialise active_episode_id as part of Patient.to_dict()
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmiller committed Oct 4, 2018
1 parent 57424c4 commit d109b88
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions opal/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,12 +577,10 @@ def bulk_update(self, dict_of_list_of_upgrades, user,
force=force)

def to_dict(self, user):
active_episode = self.get_active_episode()
d = {
'id': self.id,
'episodes': {episode.id: episode.to_dict(user) for episode in
self.episode_set.all()},
'active_episode_id': active_episode.id if active_episode else None,
self.episode_set.all()}
}

for model in patient_subrecords():
Expand Down

0 comments on commit d109b88

Please sign in to comment.