Created
October 30, 2014 14:54
-
-
Save ankona/ba350040ad40e3d962eb to your computer and use it in GitHub Desktop.
update DBSession to comply with fields newly configured as required
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from google.appengine.ext import db | |
from datetime import datetime | |
# local override with start not being required | |
class DBSession(db.Model): | |
start = db.DateTimeProperty() | |
title = db.StringProperty() | |
for s in DBSession.all(): | |
save_it = False | |
if not s.start: | |
save_it = True | |
s.start = datetime(2014, 1, 1) | |
if not s.title: | |
save_it = True | |
s.title = 'space-holder-title' | |
if save_it: | |
s.put() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment