Skip to content

Commit

Permalink
model updates
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBurchLog committed Feb 28, 2024
1 parent c3942df commit bb6e025
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions brewtils/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1412,6 +1412,8 @@ def __init__(
parent=None,
children=None,
metadata=None,
default_user=None,
shared_users=None
):
self.id = id
self.name = name
Expand All @@ -1429,6 +1431,9 @@ def __init__(
self.children = children
self.metadata = metadata or {}

self.default_user = default_user
self.shared_users = shared_users

def __str__(self):
return "%s" % self.name

Expand Down
2 changes: 2 additions & 0 deletions brewtils/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,8 @@ class GardenSchema(BaseSchema):
"self", exclude=("parent"), many=True, default=None, allow_none=True
)
metadata = fields.Dict(allow_none=True)
default_user = fields.Bool(allow_none=True)
shared_users = fields.Bool(allow_none=True)


class JobSchema(BaseSchema):
Expand Down
4 changes: 3 additions & 1 deletion brewtils/test/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ def role_dict():
"scope_namespaces": [],
"scope_systems": [],
"scope_instances": [],
"scope_verisons": [],
"scope_versions": [],
"scope_commands": [],
}

Expand Down Expand Up @@ -837,6 +837,8 @@ def garden_dict(ts_epoch, system_dict, connection_dict, connection_publishing_di
"has_parent": False,
"children": [],
"metadata": {},
"default_user": None,
"shared_users":True,
}


Expand Down

0 comments on commit bb6e025

Please sign in to comment.