Delete meeeting fix
This commit is contained in:
parent
bf1c7b95fd
commit
508508a416
@ -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:
|
||||||
|
@ -81,10 +81,13 @@ class NLG:
|
|||||||
place = slots['place']
|
place = slots['place']
|
||||||
part_list = slots['participants']
|
part_list = slots['participants']
|
||||||
part = ""
|
part = ""
|
||||||
for p in part_list:
|
if part_list is None:
|
||||||
part += p
|
part = None
|
||||||
part += ", "
|
else:
|
||||||
part = part[:-2]
|
for p in part_list:
|
||||||
|
part += p
|
||||||
|
part += ", "
|
||||||
|
part = part[:-2]
|
||||||
desc = slots['description']
|
desc = slots['description']
|
||||||
return f'Odwołać te spotkanie?:\n' \
|
return f'Odwołać te spotkanie?:\n' \
|
||||||
f'Dzień: {date}\nCzas: {time}\nMiejsce: {place}\nUczestnicy: {part}\nOpis: {desc}'
|
f'Dzień: {date}\nCzas: {time}\nMiejsce: {place}\nUczestnicy: {part}\nOpis: {desc}'
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user