mirror of
https://github.com/GSA/notifications-api.git
synced 2026-05-28 01:48:33 -04:00
Split schema for provider and provider history
This commit is contained in:
@@ -169,9 +169,19 @@ class ProviderDetailsSchema(BaseSchema):
|
||||
strict = True
|
||||
|
||||
|
||||
class ProviderDetailsHistorySchema(ProviderDetailsSchema):
|
||||
class ProviderDetailsHistorySchema(BaseSchema):
|
||||
created_by_user = fields.Nested(
|
||||
UserSchema,
|
||||
attribute='created_by',
|
||||
dump_to='created_by',
|
||||
only=['id', 'name', 'email_address'],
|
||||
dump_only=True
|
||||
)
|
||||
|
||||
class Meta:
|
||||
model = models.ProviderDetailsHistory
|
||||
exclude = ("provider_rates", "provider_stats")
|
||||
strict = True
|
||||
|
||||
|
||||
class ServiceSchema(BaseSchema):
|
||||
|
||||
Reference in New Issue
Block a user