Spaces:
Runtime error
Runtime error
Commit ·
0a20852
1
Parent(s): e91a221
Update app.py
Browse files25 unmodified lines2627282930313233343525 unmodified linesprint(incoming)result = {}for key, value in incoming.items():if int(value) > 0:result[key] = str(int(value) - 1)else:result[key] = "0"response = jsonify(result)return responseexcept Exception as e:25 unmodified lines2627282930313233343536373825 unmodified linesprint(incoming)result = {}for key, value in incoming.items():if isinstance(value, int):if value > 0:result[key] = str(value - 1)else:result[key] = "0"else:result[key] = "0" # Если значение не является целым числом, присваиваем "0"response = jsonify(result)return responseexcept Exception as e:
app.py+6-3