Skip to content

Commit 04e784e

Browse files
authored
Merge pull request #122 from PyAr/121
Corrige el tipo de dato de 'slot.start' a hora si es un entero
2 parents fb4d0a3 + 9aa5fc8 commit 04e784e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/pycamp_bot/models.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ def is_busy(self, from_time, to_time):
4545
project_presentation_slots = Slot.select().where(Slot.current_wizard == self)
4646
for slot in project_presentation_slots:
4747
# https://stackoverflow.com/a/13403827/1161156
48+
# Fix-patch for int tipe
49+
if isinstance(slot.start, int):
50+
slot.start = from_time.replace(hour=slot.start)
4851
latest_start = max(from_time, slot.start)
4952
earliest_end = min(to_time, slot.get_end_time())
5053
if latest_start <= earliest_end: # Overlap

0 commit comments

Comments
 (0)