Spaces:
Runtime error
Runtime error
Commit ·
65d61ae
1
Parent(s): 4b3cb4a
Update app.py
Browse files21 unmodified lines2223242526272829303132333421 unmodified linesprint(incoming)result = {}for key, value in incoming.items():if value.isdigit(): # Проверяем, является ли значение числомif int(value) > 0:result[key] = str(int(value) - 1)else:result[key] = "0"else:result[key] = "0" # Если значение не является числом, присваиваем "0"response = jsonify(result)return responseexcept Exception as e:21 unmodified lines2223242526272829303132333421 unmodified linesprint(incoming)result = {}for key, value in incoming.items():if value.isdigit():if int(value) > 0:result[key] = str(int(value) - 1)else:result[key] = "0"else:result[key] = "0"response = jsonify(result)return responseexcept Exception as e:
app.py+2-2