Skip to content

fix: CallDeferred with SkeletonInstance#1518

Open
ArneGudermann wants to merge 1 commit into
viur-framework:developfrom
ArneGudermann:fix/CallDeferred-Skeletoninstance
Open

fix: CallDeferred with SkeletonInstance#1518
ArneGudermann wants to merge 1 commit into
viur-framework:developfrom
ArneGudermann:fix/CallDeferred-Skeletoninstance

Conversation

@ArneGudermann

Copy link
Copy Markdown
Contributor

Fix for #1390

@ArneGudermann ArneGudermann changed the base branch from main to develop July 10, 2025 15:14

@phorward phorward left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also stumbled across this about a year ago and decided at the time that this problem could not be solved.

It's precisely about these edge cases: What if, for example, a subskel or even ActionSkel with a different bone order is put in here? Then there is no child and a skeletonByKind also fails.

I would therefore like to open this topic for discussion.

Comment on lines +50 to +52
data = obj.dbEntity
if data is None:
data ={}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
data = obj.dbEntity
if data is None:
data ={}
data = obj.dbEntity or {}

if data is None:
data ={}
return {
".__entity__": ViURJsonEncoder.preprocess(dict(data)),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

db.Entity inherits from dict. I think this is obsolete, but please test.

Suggested change
".__entity__": ViURJsonEncoder.preprocess(dict(data)),
".__entity__": ViURJsonEncoder.preprocess(data),

return entity
elif len(obj) == 3 and all(k in obj for k in (".__entity__", ".__key__", ".__skel__")):
from viur.core.skeleton.utils import skeletonByKind
skel = skeletonByKind(obj[".__skel__"])()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if a subskel of a given kind was provided? This won't work.

@phorward phorward added the viur-meeting Issues to discuss in the next ViUR meeting label Jul 10, 2025
@phorward phorward added this to the ViUR-core v3.9 milestone Jul 14, 2025
@phorward phorward added the feature New feature or request label Jul 21, 2025
@phorward phorward removed the viur-meeting Issues to discuss in the next ViUR meeting label Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants