Skip to content

Commit

Permalink
Update Demo Fixtures Creation
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffshek committed Dec 5, 2020
1 parent 189d744 commit 52f340d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions open/core/betterself/utilities/demo_user_factory_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@

logger = logging.getLogger(__name__)

"""
# prob want to run this
dpy runscript betterself_create_demo_fixtures
"""


def create_demo_fixtures_for_user(user):
username = user.username
Expand Down Expand Up @@ -104,8 +110,13 @@ def create_demo_fixtures_for_user(user):
end_dt = date.replace(hour=23)

for supplement in supplements:

result = FuzzyDateTime(start_dt=start_dt, end_dt=end_dt).fuzz()

# nothing more than right now, that's just noisy
if result > utc_now:
continue

SupplementLogFactory.create_batch(
supplement_logs_to_create_daily,
user=user,
Expand Down

0 comments on commit 52f340d

Please sign in to comment.