Skip to content

Commit 8cb720f

Browse files
committed
fix: comment out test notes and polymorphic relationship mappings in environment and notes files
1 parent e5897c8 commit 8cb720f

2 files changed

Lines changed: 13 additions & 14 deletions

File tree

db/notes.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
from db.base import Base, AutoBaseMixin, ReleaseMixin, lexicon_term
2020

2121
if TYPE_CHECKING:
22-
from db.thing import Thing
23-
from db.location import Location
22+
pass
2423

2524

2625
class Notes(Base, AutoBaseMixin, ReleaseMixin):
@@ -50,16 +49,16 @@ class Notes(Base, AutoBaseMixin, ReleaseMixin):
5049

5150
# --- Polymorphic Parent Relationships (Internal) ---
5251
# These are viewonly relationships used by the 'target' property below.
53-
_thing_target: Mapped["Thing"] = relationship(
54-
"Thing",
55-
primaryjoin="and_(foreign(Notes.target_id) == Thing.id, Notes.target_table == 'thing')",
56-
viewonly=True,
57-
)
58-
_location_target: Mapped["Location"] = relationship(
59-
"Location",
60-
primaryjoin="and_(foreign(Notes.target_id) == Location.id, Notes.target_table == 'location')",
61-
viewonly=True,
62-
)
52+
# _thing_target: Mapped["Thing"] = relationship(
53+
# "Thing",
54+
# primaryjoin="and_(foreign(Notes.target_id) == Thing.id, Notes.target_table == 'thing')",
55+
# viewonly=True,
56+
# )
57+
# _location_target: Mapped["Location"] = relationship(
58+
# "Location",
59+
# primaryjoin="and_(foreign(Notes.target_id) == Location.id, Notes.target_table == 'location')",
60+
# viewonly=True,
61+
# )
6362

6463
@property
6564
def target(self):
@@ -102,6 +101,7 @@ def notes(cls):
102101
),
103102
cascade="all, delete-orphan",
104103
lazy="selectin",
104+
overlaps="notes",
105105
)
106106

107107
def add_note(

tests/features/environment.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
Deployment,
3030
TransducerObservationBlock,
3131
)
32-
3332
from db.engine import session_ctx
3433

3534

@@ -49,7 +48,7 @@ def closure(context, *args, **kwargs):
4948
def add_location(context, session):
5049
loc = Location(
5150
# name="first location",
52-
notes="these are some test notes",
51+
# notes="these are some test notes",
5352
point="POINT(-107.949533 33.809665)",
5453
elevation=2464.9,
5554
release_status="draft",

0 commit comments

Comments
 (0)