Skip to content

Commit

Permalink
Tweak to last_modified model
Browse files Browse the repository at this point in the history
  • Loading branch information
brystmar committed Jul 15, 2020
1 parent 5849ed4 commit 2e2bb25
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions backend/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class Config(object):
# App-related
BOUND_PORT = 5000
DOMAIN_URL = environ.get('DOMAIN_URL')
WHITELISTED_ORIGIN = environ.get('WHITELISTED_ORIGIN')
WHITELISTED_ORIGINS = environ.get('WHITELISTED_ORIGINS')
SECRET_KEY = environ.get('SECRET_KEY') or '0mW7@LN0n32L6ntaj0d8jzsXiAW4mkPL7u5l'

Expand Down
2 changes: 1 addition & 1 deletion backend/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class Meta:
# Stored as UTC timestamp in the db, operates as datetime here, exported as string or epoch
date_added = UTCDateTimeAttribute(default=datetime.utcnow())
start_time = UTCDateTimeAttribute(default=datetime.utcnow())
last_modified = UTCDateTimeAttribute(default=datetime.utcnow())
last_modified = UTCDateTimeAttribute(default=datetime.utcnow(), null=True)

def update_last_modified(self):
self.last_modified = datetime.utcnow()
Expand Down
4 changes: 2 additions & 2 deletions data/update_local_ddb_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ def display_all_table_data(table):
print("Primary done\n")

print("Writing to Secondary tables")
copy_all_table_data(recipe_table_cloud_primary, recipe_table_cloud_secondary)
copy_all_table_data(replacement_table_cloud_primary, replacement_table_cloud_secondary)
# copy_all_table_data(recipe_table_cloud_primary, recipe_table_cloud_secondary)
# copy_all_table_data(replacement_table_cloud_primary, replacement_table_cloud_secondary)
print("Secondary done\n")

print("Done writing to tables.")

0 comments on commit 2e2bb25

Please sign in to comment.