Esempio n. 1
0
def delete_blackout(blackout):

    if request.method == 'DELETE' or (request.method == 'POST' and request.json['_method'] == 'delete'):
        try:
            response = db.delete_blackout(blackout)
        except Exception as e:
            return jsonify(status="error", message=str(e)), 500

        if response:
            return jsonify(status="ok")
        else:
            return jsonify(status="error", message="not found"), 404
Esempio n. 2
0
def delete_blackout(blackout):

    if request.method == 'DELETE' or (request.method == 'POST' and request.json['_method'] == 'delete'):
        try:
            response = db.delete_blackout(blackout)
        except Exception as e:
            return jsonify(status="error", message=str(e)), 500

        if response:
            return jsonify(status="ok")
        else:
            return jsonify(status="error", message="not found"), 404
Esempio n. 3
0
def delete_blackout(tenant, blackout):

    tenant = generateDBName(tenant)

    try:
        response = db.delete_blackout(tenant, blackout)
    except Exception as e:
        return jsonify(status="error", message=str(e)), 500

    if response:
        return jsonify(status="ok")
    else:
        return jsonify(status="error", message="not found"), 404
Esempio n. 4
0
 def delete(self):
     return db.delete_blackout(self.id)
Esempio n. 5
0
 def delete(self) -> bool:
     return db.delete_blackout(self.id)
Esempio n. 6
0
 def delete(self):
     return db.delete_blackout(self.id)
Esempio n. 7
0
 def delete(self) -> bool:
     return db.delete_blackout(self.id)
Esempio n. 8
0
 def delete(self) -> bool:
     result = db.delete_blackout(self.id)
     process_blackout(self, action='delete')
     return result