f3-data-models 0.1.12__tar.gz → 0.1.14__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.12
3
+ Version: 0.1.14
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
@@ -286,6 +286,7 @@ class Org(Base):
286
286
  achievements (Optional[List[Achievement]]): The achievements available within the organization.
287
287
  parent_org (Optional[Org]): The parent organization.
288
288
  event_tags_x_org (Optional[List[EventTag_x_Org]]): The association between event tags and organizations.
289
+ slack_space (Optional[SlackSpace]): The associated Slack workspace.
289
290
  """
290
291
 
291
292
  __tablename__ = "orgs"
@@ -326,6 +327,9 @@ class Org(Base):
326
327
  event_tags_x_org: Mapped[Optional[List["EventTag_x_Org"]]] = relationship(
327
328
  "EventTag_x_Org", cascade="expunge"
328
329
  )
330
+ slack_space: Mapped[Optional["SlackSpace"]] = relationship(
331
+ "SlackSpace", secondary="orgs_x_slack_spaces", cascade="expunge"
332
+ )
329
333
 
330
334
 
331
335
  class EventType(Base):
@@ -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)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "f3-data-models"
3
- version = "0.1.12"
3
+ version = "0.1.14"
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"