File tree Expand file tree Collapse file tree 2 files changed +13
-13
lines changed
jac-cloud/jac_cloud/tests Expand file tree Collapse file tree 2 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -749,7 +749,6 @@ walker get_custom_object {
749
749
has object_id: str;
750
750
751
751
can enter1 with `root entry {
752
- import:py from jac_cloud.core.architype {BaseAnchor}
753
752
try {
754
753
report &(self.object_id);
755
754
} except Exception as e {
@@ -762,7 +761,6 @@ walker update_custom_object {
762
761
has object_id: str;
763
762
764
763
can enter1 with `root entry {
765
- import:py from jac_cloud.core.architype {BaseAnchor}
766
764
savable_object = &(self.object_id);
767
765
savable_object.parent.child.json["c"] = 3;
768
766
savable_object.parent.child.arr.append(3);
@@ -785,6 +783,13 @@ walker delete_custom_object {
785
783
786
784
can enter1 with `root entry {
787
785
import:py from jac_cloud.core.architype {BaseAnchor}
788
- Jac.destroy(BaseAnchor.ref(self.object_id));
786
+ Jac.destroy(&(self.object_id));
787
+
788
+ # This is similar to
789
+ #
790
+ # Jac.destroy(BaseAnchor.ref(self.object_id));
791
+ #
792
+ # The only difference is BaseAnchor.ref doesn't
793
+ # load the actual object and just use it as reference
789
794
}
790
795
}
Original file line number Diff line number Diff line change @@ -238,15 +238,6 @@ def create_cmd() -> None:
238
238
return plugin_manager .hook .create_cmd ()
239
239
240
240
241
- class JacCallable :
242
- """Jac Callable Executions."""
243
-
244
- @staticmethod
245
- def get_object (id : str ) -> Architype | None :
246
- """Get object given id."""
247
- return plugin_manager .hook .get_object_func ()(id = id )
248
-
249
-
250
241
class JacFeature (
251
242
JacClassReferences ,
252
243
JacAccessValidation ,
@@ -255,7 +246,6 @@ class JacFeature(
255
246
JacWalker ,
256
247
JacBuiltin ,
257
248
JacCmd ,
258
- JacCallable ,
259
249
):
260
250
"""Jac Feature."""
261
251
@@ -274,6 +264,11 @@ def reset_graph(root: Optional[Root] = None) -> int:
274
264
"""Purge current or target graph."""
275
265
return plugin_manager .hook .reset_graph (root = root )
276
266
267
+ @staticmethod
268
+ def get_object (id : str ) -> Architype | None :
269
+ """Get object given id."""
270
+ return plugin_manager .hook .get_object_func ()(id = id )
271
+
277
272
@staticmethod
278
273
def get_object_func () -> Callable [[str ], Architype | None ]:
279
274
"""Get object given id."""
You can’t perform that action at this time.
0 commit comments