generated from nathanwoodburn/python-webserver-template
fix: Cast blocks in csv to int
All checks were successful
Build Docker / BuildImage (push) Successful in 31s
All checks were successful
Build Docker / BuildImage (push) Successful in 31s
This commit is contained in:
@@ -172,6 +172,13 @@ def bulk_upload_notifications():
|
|||||||
|
|
||||||
domain = parts[0].strip()
|
domain = parts[0].strip()
|
||||||
blocks = parts[1].strip()
|
blocks = parts[1].strip()
|
||||||
|
try:
|
||||||
|
blocks = int(blocks)
|
||||||
|
if blocks <= 0:
|
||||||
|
return jsonify({"error": "Blocks must be a positive integer"}), 400
|
||||||
|
except ValueError:
|
||||||
|
return jsonify({"error": "Invalid blocks value"}), 400
|
||||||
|
|
||||||
notification_type = parts[2].strip().lower() # Normalize to lowercase
|
notification_type = parts[2].strip().lower() # Normalize to lowercase
|
||||||
|
|
||||||
# Find the notification type
|
# Find the notification type
|
||||||
|
|||||||
Reference in New Issue
Block a user