Skip to content
Snippets Groups Projects
Commit 4e981870 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch 'bug/fix_requirements_and_code_for_tests_to_pass' into 'devel_0.12.x'

Bug/fix requirements and code for tests to pass

See merge request NCER-PD/scheduling-system!202
parents 79177aec 3806c55a
No related branches found
No related tags found
3 merge requests!208Update/merge 12 into 13,!207Merge Devel 0.12.x into Master (0.13.x),!202Bug/fix requirements and code for tests to pass
Pipeline #7823 passed
pandas==0.23.4 asn1crypto==0.24.0
numpy==1.15.2 Babel==2.6.0
matplotlib==2.2.3 backports.functools-lru-cache==1.5
certifi==2018.8.24
cffi==1.11.5
chardet==3.0.4
coverage==4.5.1
cryptography==2.3.1
cycler==0.10.0
Django==1.11.5 Django==1.11.5
gunicorn==19.6.0
Pillow==3.4.2
psycopg2==2.6.2
pytz==2016.10
lxml==3.7.3
python-docx==0.8.6
django-cleanup==0.4.2 django-cleanup==0.4.2
django_cron==0.5.0 django-common-helpers==0.9.2
django-two-factor-auth==1.6.1 django-cron==0.5.0
nexmo
django-excel==0.0.9 django-excel==0.0.9
pyexcel-xls==0.5.0 django-formtools==2.1
pyexcel==0.5.3 django-otp==0.5.0
pycurl==7.43.0 django-phonenumber-field==1.3.0
django-stronghold==0.2.9 django-stronghold==0.2.9
timeout-decorator==0.4.0 django-two-factor-auth==1.6.1
Unidecode==1.0.22 enum34==1.1.6
Faker==0.9.2 Faker==0.9.2
funcsigs==1.0.2
gunicorn==19.6.0
idna==2.7
ipaddress==1.0.22
kiwisolver==1.0.1
lml==0.0.1
luhn==0.2.0
lxml==3.7.3
matplotlib==2.2.3
mockito==1.1.1
nexmo==2.3.0
numpy==1.15.2
pandas==0.23.4 pandas==0.23.4
numpy==1.15.2 phonenumberslite==8.9.14
\ No newline at end of file Pillow==3.4.2
psycopg2==2.7.6.1
pycparser==2.19
pycurl==7.43.0.2
pyexcel==0.5.3
pyexcel-io==0.5.9.1
pyexcel-webio==0.1.4
pyexcel-xls==0.5.0
PyJWT==1.6.4
pyparsing==2.2.2
python-dateutil==2.7.3
python-docx==0.8.6
pytz==2016.10
qrcode==4.0.4
requests==2.19.1
six==1.11.0
sqlparse==0.2.4
subprocess32==3.5.2
text-unidecode==1.2
texttable==1.4.0
timeout-decorator==0.4.0
Unidecode==1.0.22
urllib3==1.23
xlrd==1.1.0
xlwt==1.3.0
...@@ -4,9 +4,6 @@ from django.core.management.base import BaseCommand ...@@ -4,9 +4,6 @@ from django.core.management.base import BaseCommand
from ...models import Appointment, Location, AppointmentType, AppointmentTypeLink from ...models import Appointment, Location, AppointmentType, AppointmentTypeLink
appointment_type_other = AppointmentType.objects.filter(code='OTHER').first()
def get_easter_monday(easter_sunday): def get_easter_monday(easter_sunday):
return next_weekday(easter_sunday, 0) return next_weekday(easter_sunday, 0)
...@@ -64,6 +61,7 @@ class Command(BaseCommand): ...@@ -64,6 +61,7 @@ class Command(BaseCommand):
holiday.comment = comment holiday.comment = comment
holiday.visit_id = None holiday.visit_id = None
holiday.save() holiday.save()
appointment_type_other = AppointmentType.objects.get_or_create(code='OTHER', defaults={default_duration: 60})
link = AppointmentTypeLink(appointment=holiday, appointment_type=appointment_type_other) link = AppointmentTypeLink(appointment=holiday, appointment_type=appointment_type_other)
link.save() link.save()
...@@ -92,4 +90,4 @@ def next_weekday(day_datetime, week_day): ...@@ -92,4 +90,4 @@ def next_weekday(day_datetime, week_day):
days_ahead = week_day - day_datetime.weekday() days_ahead = week_day - day_datetime.weekday()
if days_ahead <= 0: if days_ahead <= 0:
days_ahead += 7 days_ahead += 7
return day_datetime + datetime.timedelta(days_ahead) return day_datetime + datetime.timedelta(days_ahead)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment