Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianmaurer committed Apr 29, 2015
1 parent 71ba66d commit d8b925a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions djsixpack/djsixpack.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,11 @@ def convert(self, kpi=None):
if self.local:
try:
participant = SixpackParticipant.objects.get(unique_attr=self.client_id, experiment_name=experiment_name)
participant.convert = True
participant.save()
except SixpackParticipant.DoesNotExist:
pass
else:
participant.convert = True
participant.save()

except RequestException as e:
logger.exception("Error while trying to .convert: %s", e)
Expand Down
1 change: 1 addition & 0 deletions djsixpack/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
class SixpackParticipant(models.Model):
"""
A model that contains fields relating to a sixpack experiment participant.
"""
experiment_name = models.CharField(max_length=255, db_index=True)
unique_attr = models.CharField(max_length=255, db_index=True)
Expand Down

0 comments on commit d8b925a

Please sign in to comment.