fix: Cast blocks in csv to int
All checks were successful
Build Docker / BuildImage (push) Successful in 31s

This commit is contained in:
2025-07-29 12:39:06 +10:00
parent 55e6306e35
commit 69e2cdb85e

View File

@@ -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