fix flake 8

This commit is contained in:
Kenneth Kehl
2024-05-15 08:34:56 -07:00
parent c3a20eca17
commit e7c68531f2
2 changed files with 22 additions and 17 deletions

View File

@@ -64,9 +64,11 @@ def get_notification_by_id(notification_id):
@notifications.route("/notifications", methods=["GET"])
def get_all_notifications():
current_app.logger.debug(f"enter get_all_notifications()")
current_app.logger.debug("enter get_all_notifications()")
data = notifications_filter_schema.load(request.args)
current_app.logger.debug(f"get_all_notifications() data {data} request.args {request.args}")
current_app.logger.debug(
f"get_all_notifications() data {data} request.args {request.args}"
)
include_jobs = data.get("include_jobs", False)
page = data.get("page", 1)
@@ -99,18 +101,17 @@ def get_all_notifications():
notification.normalised_to = recipient
result = jsonify(
notifications=notification_with_personalisation_schema.dump(
pagination.items, many=True
),
page_size=page_size,
total=pagination.total,
links=pagination_links(
pagination, ".get_all_notifications", **request.args.to_dict()
),
)
notifications=notification_with_personalisation_schema.dump(
pagination.items, many=True
),
page_size=page_size,
total=pagination.total,
links=pagination_links(
pagination, ".get_all_notifications", **request.args.to_dict()
),
)
current_app.logger.debug(f"result={result}")
return result,200
return result, 200
@notifications.route("/notifications/<string:notification_type>", methods=["POST"])