Skip to content

Commit

Permalink
update edc-base imports
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvw committed Mar 5, 2017
1 parent 3a433cd commit 2544058
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion edc_timepoint/model_mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ def timepoint_open_timepoint(self):
if self.timepoint_status == CLOSED_TIMEPOINT:
self.timepoint_status = OPEN_TIMEPOINT
self.timepoint_closed_datetime = None
self.save(update_fields=['timepoint_closed_datetime', 'timepoint_status'])
self.save(
update_fields=['timepoint_closed_datetime', 'timepoint_status'])

def timepoint(self):
"""Formats and returns the status for the change_list."""
Expand Down
5 changes: 3 additions & 2 deletions example/models.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from django.db import models
from django.utils import timezone

from edc_base.model.models.base_uuid_model import BaseUuidModel
from edc_base.model_mixins import BaseUuidModel
from edc_timepoint.model_mixins import TimepointModelMixin, TimepointLookupModelMixin
from edc_timepoint.timepoint_lookup import TimepointLookup

Expand Down Expand Up @@ -36,7 +36,8 @@ class Meta:

class CrfModel(TimepointLookupModelMixin, BaseUuidModel):

timepoint_lookup = TimepointLookup('example.examplemodel', 'visit__example_model__timepoint_status')
timepoint_lookup = TimepointLookup(
'example.examplemodel', 'visit__example_model__timepoint_status')

visit = models.ForeignKey(Visit)

Expand Down

0 comments on commit 2544058

Please sign in to comment.