Skip to content

Commit

Permalink
state of preservation, save
Browse files Browse the repository at this point in the history
  • Loading branch information
pjaskulski committed Feb 6, 2020
1 parent e24bbd2 commit fa14e7b
Show file tree
Hide file tree
Showing 3 changed files with 436 additions and 53 deletions.
12 changes: 12 additions & 0 deletions controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,15 @@ def find_skeleton(session, skeleton_id):
result = session.query(Skeleton).get(skeleton_id)

return result


def edit_preservation(session, id_num, data):
"""
Edit a record
data - dictionary: {'forntal': 1}
"""

record = session.query(Skeleton).filter_by(skeleton_id=id_num).update(data)

session.flush()
session.commit()
Loading

0 comments on commit fa14e7b

Please sign in to comment.