Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

source-braintree-native: fix nullable key on full refresh resources #2192

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source-braintree-native/source_braintree_native/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class Advanced(BaseModel):


class FullRefreshResource(BaseDocument, extra="allow"):
id: str | None
pass


class IncrementalResource(BaseDocument, extra="allow"):
Expand Down
4 changes: 2 additions & 2 deletions source-braintree-native/source_braintree_native/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@ def open(
gateway_property,
gateway_response_field,
),
tombstone=FullRefreshResource(_meta=FullRefreshResource.Meta(op="d"), id=None)
tombstone=FullRefreshResource(_meta=FullRefreshResource.Meta(op="d"))
)

return [
common.Resource(
name=name,
key=["/id"],
key=["/_meta/row_id"],
model=FullRefreshResource,
open=functools.partial(open, _create_gateway(config), gateway_property, gateway_response_field),
initial_state=ResourceState(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,28 +40,14 @@
"row_id": -1
},
"description": "Document metadata"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Id"
}
},
"required": [
"id"
],
"title": "FullRefreshResource",
"type": "object",
"x-infer-schema": true
},
"key": [
"/id"
"/_meta/row_id"
]
},
{
Expand Down Expand Up @@ -105,28 +91,14 @@
"row_id": -1
},
"description": "Document metadata"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Id"
}
},
"required": [
"id"
],
"title": "FullRefreshResource",
"type": "object",
"x-infer-schema": true
},
"key": [
"/id"
"/_meta/row_id"
]
},
{
Expand Down Expand Up @@ -170,28 +142,14 @@
"row_id": -1
},
"description": "Document metadata"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Id"
}
},
"required": [
"id"
],
"title": "FullRefreshResource",
"type": "object",
"x-infer-schema": true
},
"key": [
"/id"
"/_meta/row_id"
]
},
{
Expand Down Expand Up @@ -235,28 +193,14 @@
"row_id": -1
},
"description": "Document metadata"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Id"
}
},
"required": [
"id"
],
"title": "FullRefreshResource",
"type": "object",
"x-infer-schema": true
},
"key": [
"/id"
"/_meta/row_id"
]
},
{
Expand Down
Loading