Skip to content

Commit

Permalink
Merge pull request hyperledger#72 from Indicio-tech/feature/credentia…
Browse files Browse the repository at this point in the history
…l-attachments-issuer

fix: supplement singular
  • Loading branch information
dbluhm committed Aug 31, 2022
2 parents 6650dad + bac8db0 commit 250000f
Showing 1 changed file with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Supplements inner model."""

from typing import Optional
from typing import Optional, Sequence
from uuid import uuid4
from marshmallow import fields, validate

Expand Down Expand Up @@ -35,16 +35,22 @@ class Meta:
value = fields.Str(description="Value of attribute key value pair", required=True)


class Supplements(BaseModel):
class Supplement(BaseModel):
"""Model for the supplements received in issue credential message."""

class Meta:
"""Meta of Supplements."""

schema_class = "SupplementsSchema"
schema_class = "SupplementSchema"

def __init__(
self, *, type: str, ref: str, attrs: dict, id: Optional[str] = None, **kwargs
self,
*,
type: str,
ref: str,
attrs: Sequence[SupplementAttribute],
id: Optional[str] = None,
**kwargs
):
"""Initialize supplements."""
super().__init__(**kwargs)
Expand All @@ -54,13 +60,13 @@ def __init__(
self.attrs = attrs


class SupplementsSchema(BaseModelSchema):
class SupplementSchema(BaseModelSchema):
"""Supplements schema."""

class Meta:
"""Supplements meta."""

model_class = Supplements
model_class = Supplement

type = fields.Str(
description="Type of the supplement",
Expand Down

0 comments on commit 250000f

Please sign in to comment.