Skip to content

Conversation

@dnwpark
Copy link
Contributor

@dnwpark dnwpark commented Sep 4, 2025

close #883

Given a schema:

type Target;
type SourceWithProp {
    target: Target {
        lprop: int64;
    };
};

the following code:

with_none = default.SourceWithProp(target=None)
self.client.sync(with_none)

produced an AssertionError:

File ".../edgedb-python/gel/_internal/_save.py", line 1105, in make_save_executor_constructor
) = make_plan(
    ^^^^^^^^^^
File ".../edgedb-python/gel/_internal/_save.py", line 737, in make_plan
assert isinstance(val, ProxyModel)
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^

@dnwpark dnwpark requested a review from msullivan September 4, 2025 02:06
assert val is None or isinstance(val, GelModel)
if val is None:
sch = SingleLinkChange(
name=prop.name,
Copy link
Member

Choose a reason for hiding this comment

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

Don't change this in this PR, but prop ought to be called ptr

@dnwpark dnwpark merged commit be0e929 into master Sep 4, 2025
42 checks passed
@dnwpark dnwpark deleted the sync-link-w-props-none branch September 4, 2025 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Syncing a link with props with which is initialized to None produces AssertionError

3 participants