File tree Expand file tree Collapse file tree 5 files changed +34
-9
lines changed
project/observations/management/commands Expand file tree Collapse file tree 5 files changed +34
-9
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,9 @@ certifi==2024.6.2
21
21
# -c requirements.txt
22
22
# requests
23
23
charset-normalizer==3.3.2
24
- # via requests
24
+ # via
25
+ # -c requirements.txt
26
+ # requests
25
27
click==8.1.7
26
28
# via
27
29
# black
@@ -49,7 +51,9 @@ flake8==7.1.0
49
51
greenlet==3.0.3
50
52
# via bpython
51
53
idna==3.7
52
- # via requests
54
+ # via
55
+ # -c requirements.txt
56
+ # requests
53
57
isort==5.13.2
54
58
# via -r dev-requirements.in
55
59
mccabe==0.7.0
@@ -84,7 +88,9 @@ python-dateutil==2.9.0.post0
84
88
pyxdg==0.28
85
89
# via bpython
86
90
requests==2.32.3
87
- # via bpython
91
+ # via
92
+ # -c requirements.txt
93
+ # bpython
88
94
six==1.16.0
89
95
# via
90
96
# -c requirements.txt
Original file line number Diff line number Diff line change @@ -39,11 +39,12 @@ def get_source(self):
39
39
return self .source
40
40
41
41
def get_category (self , feature ):
42
- try :
43
- return ObservationCategory .objects .filter (
44
- label = self .mapping_category .get (feature .get ("id_event_type" ))
45
- ).last ()
46
- except ObservationCategory .DoesNotExist :
42
+ category = ObservationCategory .objects .filter (
43
+ label = self .mapping_category .get (feature .get ("id_event_type" ))
44
+ ).last ()
45
+ if category :
46
+ return category
47
+ else :
47
48
return ObservationCategory .add_root (
48
49
label = self .mapping_category .get (feature .get ("id_event_type" )),
49
50
)
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ djangorestframework
4
4
djangorestframework-gis
5
5
drf-spectacular
6
6
django-filter
7
+ requests
7
8
pillow
8
9
sorl-thumbnail
9
10
pymemcache
Original file line number Diff line number Diff line change @@ -19,7 +19,11 @@ botocore==1.34.140
19
19
# boto3
20
20
# s3transfer
21
21
certifi == 2024.6.2
22
- # via sentry-sdk
22
+ # via
23
+ # requests
24
+ # sentry-sdk
25
+ charset-normalizer == 3.3.2
26
+ # via requests
23
27
django == 5.0.7
24
28
# via
25
29
# -r requirements.in
@@ -59,6 +63,8 @@ drf-spectacular==0.27.2
59
63
# via -r requirements.in
60
64
gunicorn == 22.0.0
61
65
# via -r requirements.in
66
+ idna == 3.7
67
+ # via requests
62
68
inflection == 0.5.1
63
69
# via drf-spectacular
64
70
jmespath == 1.0.1
@@ -89,6 +95,8 @@ referencing==0.35.1
89
95
# via
90
96
# jsonschema
91
97
# jsonschema-specifications
98
+ requests == 2.32.3
99
+ # via -r requirements.in
92
100
rpds-py == 0.18.1
93
101
# via
94
102
# jsonschema
@@ -110,4 +118,5 @@ uritemplate==4.1.1
110
118
urllib3 == 2.2.2
111
119
# via
112
120
# botocore
121
+ # requests
113
122
# sentry-sdk
Original file line number Diff line number Diff line change 1
1
CHANGE LOG
2
2
==========
3
3
4
+ 1.0.2 (2024-07-24)
5
+ ----------------------
6
+
7
+ ** Bugfix**
8
+
9
+ - Import data command does not work
10
+
11
+
4
12
1.0.1 (2024-07-24)
5
13
----------------------
6
14
You can’t perform that action at this time.
0 commit comments