Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2f7113f0c5 | |||
| 7f38b24421 | |||
| cac4551fdf | |||
| 813bc8be4d | |||
| a45ae03235 |
@@ -58,7 +58,7 @@ def get_local_accounts(base_path: Optional[str] = None) -> List[Account]:
|
|||||||
res = account_storage.get_all_objects()
|
res = account_storage.get_all_objects()
|
||||||
account_storage.close()
|
account_storage.close()
|
||||||
if res:
|
if res:
|
||||||
accounts.extend(Account.model_validate_json(r[1]) for r in res)
|
accounts.extend(Account.parse_raw(r[1]) for r in res)
|
||||||
except SpeckleException:
|
except SpeckleException:
|
||||||
# cannot open SQLiteTransport, probably because of the lack
|
# cannot open SQLiteTransport, probably because of the lack
|
||||||
# of disk write permissions
|
# of disk write permissions
|
||||||
@@ -79,7 +79,7 @@ def get_local_accounts(base_path: Optional[str] = None) -> List[Account]:
|
|||||||
if json_acct_files:
|
if json_acct_files:
|
||||||
try:
|
try:
|
||||||
accounts.extend(
|
accounts.extend(
|
||||||
Account.model_validate_json(Path(json_path, json_file).read_text())
|
Account.parse_raw(Path(json_path, json_file).read_text())
|
||||||
# Account.parse_file(os.path.join(json_path, json_file))
|
# Account.parse_file(os.path.join(json_path, json_file))
|
||||||
for json_file in json_acct_files
|
for json_file in json_acct_files
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
from typing import List, Optional
|
||||||
|
|
||||||
|
from specklepy.objects.base import Base
|
||||||
|
|
||||||
|
|
||||||
|
class GisFeature(
|
||||||
|
Base, speckle_type="Objects.GIS.GisFeature", detachable={"displayValue"}
|
||||||
|
):
|
||||||
|
"""GIS Feature"""
|
||||||
|
|
||||||
|
geometry: Optional[List[Base]] = None
|
||||||
|
attributes: Base
|
||||||
|
displayValue: Optional[List[Base]] = None
|
||||||
Reference in New Issue
Block a user