Delete meeeting fix

This commit is contained in:
Piotr Kopycki 2021-06-15 09:43:04 +02:00
parent bf1c7b95fd
commit 508508a416
3 changed files with 9 additions and 5 deletions

View File

@ -231,7 +231,7 @@ class DP:
if last_user_act == UserActType.CONFIRM: if last_user_act == UserActType.CONFIRM:
system_act = SystemAct(SystemActType.AFFIRM, ['cancel_meeting']) system_act = SystemAct(SystemActType.AFFIRM, ['cancel_meeting'])
# implementacja usuwania spotkania z bazy # implementacja usuwania spotkania z bazy
self.DB.delete_meeting(slots['date'], ['time']) self.DB.delete_meeting(slots['date'], slots['time'])
self.DST.clear() self.DST.clear()
return system_act return system_act
elif last_user_act == UserActType.NEGATE: elif last_user_act == UserActType.NEGATE:

View File

@ -81,6 +81,9 @@ class NLG:
place = slots['place'] place = slots['place']
part_list = slots['participants'] part_list = slots['participants']
part = "" part = ""
if part_list is None:
part = None
else:
for p in part_list: for p in part_list:
part += p part += p
part += ", " part += ", "

View File

@ -124,6 +124,7 @@ def get_datetime_from_day(day, hours, minutes):
def get_date(date, time): def get_date(date, time):
print("test\ndate: ", date, "\ntime: ", time)
# parsowanie czasu # parsowanie czasu
if re.match(r'^[0-2][0-9]$', time): if re.match(r'^[0-2][0-9]$', time):
hours = int(time) hours = int(time)