Skip to content

Instantly share code, notes, and snippets.

@mvidalgarcia
Last active April 3, 2019 14:57
Show Gist options
  • Save mvidalgarcia/cfc6f4601c0bdfc487b7f968979525b6 to your computer and use it in GitHub Desktop.
Save mvidalgarcia/cfc6f4601c0bdfc487b7f968979525b6 to your computer and use it in GitHub Desktop.
db.session.add(RoomAttribute(name="long-term", title="Long term", is_hidden=True))
ra = RoomAttribute.query.filter_by(name='long-term').one() # Burotel
for r in Room.query.order_by(Room.id.asc()).limit(100):
RoomAttributeAssociation(room=r, attribute=ra, value='true')
db.session.commit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment