Import sqlalchemy.ext.hybrid as sa_hybrid
This commit is contained in:
parent
9d3af5e447
commit
0b2a1197a2
1 changed files with 2 additions and 2 deletions
|
|
@ -10,7 +10,7 @@ import folium
|
||||||
import sqlalchemy as sa
|
import sqlalchemy as sa
|
||||||
from sqlalchemy import orm
|
from sqlalchemy import orm
|
||||||
from sqlalchemy.dialects import postgresql as psql
|
from sqlalchemy.dialects import postgresql as psql
|
||||||
from sqlalchemy.ext import hybrid
|
from sqlalchemy.ext import hybrid as sa_hybrid
|
||||||
|
|
||||||
from velofy import config
|
from velofy import config
|
||||||
from velofy.db import meta
|
from velofy.db import meta
|
||||||
|
|
@ -124,7 +124,7 @@ class Address(meta.Base):
|
||||||
"""Non-literal text representation."""
|
"""Non-literal text representation."""
|
||||||
return f"<{self.__class__.__name__}({self.street} in {self.city_name})>"
|
return f"<{self.__class__.__name__}({self.street} in {self.city_name})>"
|
||||||
|
|
||||||
@hybrid.hybrid_property
|
@sa_hybrid.hybrid_property
|
||||||
def is_primary(self) -> bool:
|
def is_primary(self) -> bool:
|
||||||
"""If an `Address` object is the earliest one entered at its location.
|
"""If an `Address` object is the earliest one entered at its location.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue