Skip to content

Commit aaec616

Browse files
authored
Merge pull request #92 from JaviCerveraIngram/CPS-77-parse-all-fields
CPS-77 Parse all fields
2 parents d814325 + 7c73efb commit aaec616

File tree

2 files changed

+20
-17
lines changed

2 files changed

+20
-17
lines changed

CHANGES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Connect SDK Changes History
22

3+
## v18.2
4+
5+
* Fix: Accept rql.Query in resources list method.
6+
* Fix: Bug causing some schemas not parsing all the fields.
7+
38
## v18.1
49

510
* Feature: Allow masking of specified log fields.

connect/models/schemas.py

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ def _deserialize(self, value, attr, obj, **kwargs):
216216

217217

218218
class ExtIdHubSchema(BaseSchema):
219-
hub = fields.Nested(HubSchema, only=('id', 'name'))
219+
hub = fields.Nested(HubSchema)
220220
external_id = ExternalIdField()
221221

222222
@post_load
@@ -262,7 +262,7 @@ class MarketplaceSchema(BaseSchema):
262262
description = fields.Str()
263263
active_contracts = fields.Int()
264264
icon = fields.Str()
265-
owner = fields.Nested(CompanySchema, only=('id', 'name'))
265+
owner = fields.Nested(CompanySchema)
266266
hubs = fields.Nested(ExtIdHubSchema, many=True)
267267
zone = fields.Str()
268268

@@ -341,8 +341,8 @@ class AgreementSchema(BaseSchema):
341341
version_created = fields.DateTime()
342342
version_contracts = fields.Int()
343343
agreements = fields.Nested('AgreementSchema', many=True)
344-
parent = fields.Nested('AgreementSchema', only=('id', 'name'))
345-
marketplace = fields.Nested(MarketplaceSchema, only=('id', 'name'))
344+
parent = fields.Nested('AgreementSchema')
345+
marketplace = fields.Nested(MarketplaceSchema)
346346
name = fields.Str()
347347

348348
@post_load
@@ -356,16 +356,16 @@ class ContractSchema(BaseSchema):
356356
version = fields.Int()
357357
type = fields.Str()
358358
status = fields.Str()
359-
agreement = fields.Nested(AgreementSchema, only=('id', 'name'))
360-
marketplace = fields.Nested(MarketplaceSchema, only=('id', 'name'))
361-
owner = fields.Nested(CompanySchema, only=('id', 'name'))
362-
creator = fields.Nested(UserSchema, only=('id', 'name'))
359+
agreement = fields.Nested(AgreementSchema)
360+
marketplace = fields.Nested(MarketplaceSchema)
361+
owner = fields.Nested(CompanySchema)
362+
creator = fields.Nested(UserSchema)
363363
created = fields.DateTime()
364364
updated = fields.DateTime()
365365
enrolled = fields.DateTime()
366366
version_created = fields.DateTime()
367367
activation = fields.Nested(ActivationSchema)
368-
signee = fields.Nested(UserSchema, only=('id', 'name'))
368+
signee = fields.Nested(UserSchema)
369369

370370
@post_load
371371
def make_object(self, data):
@@ -528,8 +528,8 @@ def make_object(self, data):
528528

529529
class ConnectionSchema(BaseSchema):
530530
type = fields.Str()
531-
provider = fields.Nested(CompanySchema, only=('id', 'name'))
532-
vendor = fields.Nested(CompanySchema, only=('id', 'name'))
531+
provider = fields.Nested(CompanySchema)
532+
vendor = fields.Nested(CompanySchema)
533533
product = fields.Nested(ProductSchema)
534534
hub = fields.Nested(HubSchema)
535535
status = fields.Str()
@@ -547,10 +547,8 @@ class AssetSchema(BaseSchema):
547547
events = fields.Nested(EventsSchema)
548548
external_uid = fields.Str()
549549
external_name = fields.Str()
550-
product = fields.Nested(ProductSchema, only=('id', 'name'))
551-
connection = fields.Nested(
552-
ConnectionSchema, only=('id', 'type', 'provider', 'vendor')
553-
)
550+
product = fields.Nested(ProductSchema)
551+
connection = fields.Nested(ConnectionSchema)
554552
contract = fields.Nested(ContractSchema)
555553
marketplace = fields.Nested(MarketplaceSchema)
556554
params = fields.Nested(ParamSchema, many=True)
@@ -583,8 +581,8 @@ class FulfillmentSchema(BaseSchema):
583581
reason = fields.Str()
584582
note = fields.Str()
585583
asset = fields.Nested(AssetSchema)
586-
contract = fields.Nested(ContractSchema, only=('id', 'name'))
587-
marketplace = fields.Nested(MarketplaceSchema, only=('id', 'name'))
584+
contract = fields.Nested(ContractSchema)
585+
marketplace = fields.Nested(MarketplaceSchema)
588586
assignee = AssigneeField()
589587

590588
@post_load

0 commit comments

Comments
 (0)