Skip to content

Commit

Permalink
chore: new identity property
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Sep 25, 2024
1 parent 356a1d5 commit 3990b95
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/appier/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -2260,6 +2260,10 @@ def _to_meta(cls, base):
return result
return base

@property
def identity(self):
return self._id

@property
def request(self):
return common.base().get_request()
Expand Down
2 changes: 2 additions & 0 deletions src/appier/model.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ class Model:
before_callbacks: Sequence[Callable[[Self], None]] = ...,
after_callbacks: Sequence[Callable[[Self], None]] = ...,
) -> Self: ...
@property
def identity(self) -> str: ...
...

class Field:
Expand Down

0 comments on commit 3990b95

Please sign in to comment.