Skip to content

Commit 701d06f

Browse files
authored
Merge pull request #143 from atlanhq/fix_lock_problem
Correct type of is_locked attrbuted in custom metadata def
2 parents f9528de + 56e0852 commit 701d06f

3 files changed

Lines changed: 10 additions & 6 deletions

File tree

HISTORY.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.3.1 (October 6, 2023)
2+
3+
* Fix bug preventing custom metadata from being read that were written with locked bug
4+
15
## 1.3.0 (October 5, 2023)
26

37
* Correct issue with incorrect type on purpose_atlan_tags of Purpose

pyatlan/model/typedef.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from __future__ import annotations
22

33
import time
4-
from typing import Any, Callable, Literal, Optional, Protocol, Union, cast
4+
from typing import Any, Callable, Optional, Protocol, Union, cast
55

66
from pydantic import Field
77

@@ -604,7 +604,7 @@ class Options(AtlanObject):
604604
image_id: Optional[str] = Field(
605605
description="The id of the image used for the logo."
606606
)
607-
is_locked: Optional[Literal["true", "false"]] = Field(
607+
is_locked: Optional[bool] = Field(
608608
description="Indicates whether the custom metadata can be managed in the UI (false) or not (true)."
609609
)
610610
logo_type: Optional[str] = Field(
@@ -631,7 +631,7 @@ def with_logo_as_emoji(
631631
[emoji],
632632
)
633633
return CustomMetadataDef.Options(
634-
emoji=emoji, logo_type="emoji", is_locked="true" if locked else "false"
634+
emoji=emoji, logo_type="emoji", is_locked=locked
635635
)
636636

637637
@staticmethod
@@ -645,7 +645,7 @@ def with_logo_from_url(
645645
[url],
646646
)
647647
return CustomMetadataDef.Options(
648-
logo_url=url, logo_type="image", is_locked="true" if locked else "false"
648+
logo_url=url, logo_type="image", is_locked=locked
649649
)
650650

651651
@staticmethod
@@ -662,7 +662,7 @@ def with_logo_from_icon(
662662
logo_type="icon",
663663
icon_color=color,
664664
icon_name=icon,
665-
is_locked="true" if locked else "false",
665+
is_locked=locked,
666666
)
667667

668668
attribute_defs: list[AttributeDef] = Field(

pyatlan/version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.3.0
1+
1.3.1

0 commit comments

Comments
 (0)