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:
system_act = SystemAct(SystemActType.AFFIRM, ['cancel_meeting'])
# implementacja usuwania spotkania z bazy
self.DB.delete_meeting(slots['date'], ['time'])
self.DB.delete_meeting(slots['date'], slots['time'])
self.DST.clear()
return system_act
elif last_user_act == UserActType.NEGATE:

View File

@ -81,10 +81,13 @@ class NLG:
place = slots['place']
part_list = slots['participants']
part = ""
for p in part_list:
part += p
part += ", "
part = part[:-2]
if part_list is None:
part = None
else:
for p in part_list:
part += p
part += ", "
part = part[:-2]
desc = slots['description']
return f'Odwołać te spotkanie?:\n' \
f'Dzień: {date}\nCzas: {time}\nMiejsce: {place}\nUczestnicy: {part}\nOpis: {desc}'

View File

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