Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBurchLog committed Feb 1, 2024
1 parent ccfedab commit 46361be
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
9 changes: 8 additions & 1 deletion brewtils/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,14 @@ class JobExportSchema(JobSchema):
def __init__(self, *args, **kwargs):
# exclude fields from a Job that we don't want when we later go to import
# the Job definition
self.opts.exclude += ("id", "next_run_time", "success_count", "error_count", "canceled_count", "skip_count")
self.opts.exclude += (
"id",
"next_run_time",
"success_count",
"error_count",
"canceled_count",
"skip_count",
)
super(JobExportSchema, self).__init__(*args, **kwargs)

@post_load
Expand Down
9 changes: 8 additions & 1 deletion brewtils/test/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,14 @@ def job_ids_dict(job_dict):
def job_dict_for_import(job_dict):
"""A job dict but some keys and values are missing."""
dict_copy = copy.deepcopy(job_dict)
for field in ["id", "next_run_time", "success_count", "error_count","canceled_count","skip_count"]:
for field in [
"id",
"next_run_time",
"success_count",
"error_count",
"canceled_count",
"skip_count",
]:
dict_copy.pop(field, None)
return dict_copy

Expand Down

0 comments on commit 46361be

Please sign in to comment.