implement removing transmissions
This commit is contained in:
14
db.py
14
db.py
@ -53,6 +53,16 @@ def add_transmission(uid):
|
||||
log.error("Couldn't create a transmission with uid: %s"%(uid))
|
||||
log.error(error)
|
||||
|
||||
def delete_transmission(uid):
|
||||
command="DELETE FROM transmissions WHERE uid=?"
|
||||
try:
|
||||
cursor.execute(command, (uid,))
|
||||
sqliteConnection.commit()
|
||||
log.debug("Deleted a transmission with uid %s"%(uid))
|
||||
except sqlite3.Error as error:
|
||||
log.error("Couldn't delete a transmission with uid: %s"%(uid))
|
||||
log.error(error)
|
||||
|
||||
def edit_transmission(uid, date, author, title, transmission_text, timeslots, transmission_order, play):
|
||||
command="UPDATE transmissions set date=?, author=?, title=?, transmission_text=?, timeslots=?, transmission_order=?, play=? WHERE uid=?"
|
||||
try:
|
||||
@ -63,7 +73,3 @@ def edit_transmission(uid, date, author, title, transmission_text, timeslots, tr
|
||||
log.error("Couldn't create a transmission with uid %s (date %s, author %s)"%uid, (date, author))
|
||||
log.error(error)
|
||||
|
||||
|
||||
def delete_transmission():
|
||||
pass
|
||||
|
||||
|
Reference in New Issue
Block a user