diff --git a/alyx/alyx/settings_lab_template.py b/alyx/alyx/settings_lab_template.py index 8d3bfc49..4f8ac7a8 100644 --- a/alyx/alyx/settings_lab_template.py +++ b/alyx/alyx/settings_lab_template.py @@ -3,7 +3,7 @@ # ALYX-SPECIFIC ALLOWED_HOSTS = ['localhost', '127.0.0.1'] LANGUAGE_CODE = 'en-us' -TIME_ZONE = 'GB' +TIME_ZONE = 'Europe/London' GLOBUS_CLIENT_ID = '525cc543-8ccb-4d11-8036-af332da5eafd' SUBJECT_REQUEST_EMAIL_FROM = 'alyx@internationalbrainlab.org' DEFAULT_SOURCE = 'IBL' diff --git a/alyx/data/migrations/0020_alter_datarepository_timezone.py b/alyx/data/migrations/0020_alter_datarepository_timezone.py new file mode 100644 index 00000000..3dd45bcc --- /dev/null +++ b/alyx/data/migrations/0020_alter_datarepository_timezone.py @@ -0,0 +1,23 @@ +# Generated by Django 5.0 on 2024-03-26 15:27 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("data", "0019_dataset_qc"), + ] + + operations = [ + migrations.AlterField( + model_name="datarepository", + name="timezone", + field=models.CharField( + blank=True, + default="Europe/London", + help_text="Timezone of the server (see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)", + max_length=64, + ), + ), + ] diff --git a/alyx/experiments/serializers.py b/alyx/experiments/serializers.py index 92ad06a8..9e72f688 100644 --- a/alyx/experiments/serializers.py +++ b/alyx/experiments/serializers.py @@ -46,15 +46,6 @@ class TrajectoryEstimateSerializer(serializers.ModelSerializer): queryset=CoordinateSystem.objects.all(), ) - def to_internal_value(self, data): - if data.get('chronic_insertion', None) is None: - data['chronic_insertion'] = None - - if data.get('probe_insertion', None) is None: - data['probe_insertion'] = None - - return super(TrajectoryEstimateSerializer, self).to_internal_value(data) - class Meta: model = TrajectoryEstimate fields = '__all__' diff --git a/alyx/experiments/tests_rest.py b/alyx/experiments/tests_rest.py index c2138d1e..412a4a6b 100644 --- a/alyx/experiments/tests_rest.py +++ b/alyx/experiments/tests_rest.py @@ -185,6 +185,7 @@ def test_create_list_delete_trajectory(self): # create a trajectory url = reverse('trajectoryestimate-list') tdict = {'probe_insertion': alyx_insertion['id'], + 'chronic_insertion': None, 'x': -4521.2, 'y': 2415.0, 'z': 0, @@ -216,6 +217,7 @@ def test_create_list_delete_channels(self): # create the probe insertion pi = self.ar(self.post(reverse('probeinsertion-list'), self.dict_insertion), 201) tdict = {'probe_insertion': pi['id'], + 'chronic_insertion': None, 'x': -4521.2, 'y': 2415.0, 'z': 0, @@ -273,6 +275,7 @@ def test_chronic_insertion(self): # create a trajectory and attach it to the chronic insertion traj_dict = {'chronic_insertion': ci['id'], + 'probe_insertion': None, 'x': -4521.2, 'y': 2415.0, 'z': 0, diff --git a/alyx/misc/migrations/0010_alter_lab_timezone.py b/alyx/misc/migrations/0010_alter_lab_timezone.py new file mode 100644 index 00000000..3d789c58 --- /dev/null +++ b/alyx/misc/migrations/0010_alter_lab_timezone.py @@ -0,0 +1,23 @@ +# Generated by Django 5.0 on 2024-03-26 15:27 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("misc", "0009_auto_20211122_1535"), + ] + + operations = [ + migrations.AlterField( + model_name="lab", + name="timezone", + field=models.CharField( + blank=True, + default="Europe/London", + help_text="Timezone of the server (see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)", + max_length=64, + ), + ), + ] diff --git a/requirements_frozen.txt b/requirements_frozen.txt index c3d0b179..b4dfc7f1 100644 --- a/requirements_frozen.txt +++ b/requirements_frozen.txt @@ -1,7 +1,7 @@ asgiref==3.8.1 backports.zoneinfo==0.2.1 -boto3==1.34.69 -botocore==1.34.69 +boto3==1.34.70 +botocore==1.34.70 certifi==2024.2.2 cffi==1.16.0 charset-normalizer==3.3.2