f3-data-models 0.1.13__tar.gz → 0.1.15__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: f3-data-models
3
- Version: 0.1.13
3
+ Version: 0.1.15
4
4
  Summary: The data schema and models for F3 Nation applications.
5
5
  Home-page: https://github.com/F3-Nation/f3-data-models
6
6
  License: MIT
@@ -91,7 +91,9 @@ class DbManager:
91
91
  try:
92
92
  query = select(cls).filter(cls.id == id)
93
93
  query = _joinedloads(cls, query, joinedloads)
94
- return session.scalars(query).unique().one()
94
+ record = session.scalars(query).unique().one()
95
+ session.expunge(record)
96
+ return record
95
97
  finally:
96
98
  session.rollback()
97
99
  close_session(session)
@@ -165,7 +167,7 @@ class DbManager:
165
167
  def update_record(cls: T, id, fields):
166
168
  session = get_session()
167
169
  try:
168
- session.query(cls).filter(cls.get_id() == id).update(
170
+ session.query(cls).filter(cls.id == id).update(
169
171
  fields, synchronize_session="fetch"
170
172
  )
171
173
  session.flush()
@@ -248,7 +250,7 @@ class DbManager:
248
250
  def delete_record(cls: T, id):
249
251
  session = get_session()
250
252
  try:
251
- session.query(cls).filter(cls.get_id() == id).delete()
253
+ session.query(cls).filter(cls.id == id).delete()
252
254
  session.flush()
253
255
  finally:
254
256
  session.commit()
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "f3-data-models"
3
- version = "0.1.13"
3
+ version = "0.1.15"
4
4
  description = "The data schema and models for F3 Nation applications."
5
5
  authors = ["Evan Petzoldt <evan.petzoldt@protonmail.com>"]
6
6
  readme = "README.md"