Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Rex Dri
Rex Dri
Commits
82577697
Unverified
Commit
82577697
authored
May 03, 2020
by
Florent Chehab
Browse files
style(backend): run black on entire backend
* fixes small style relica
parent
6436f3cb
Pipeline
#60638
failed with stages
in 3 minutes and 5 seconds
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
backend/backend_app/models/exchangeFeedback.py
View file @
82577697
...
...
@@ -101,7 +101,7 @@ class ExchangeFeedbackViewSet(EssentialModuleViewSet):
"university"
,
"exchange__student_major"
,
"exchange__student_minor"
,
"untouched"
"untouched"
,
)
required_filterset_fields
=
(
"university"
,)
pagination_class
=
CustomPagination
backend/backend_app/models/version.py
View file @
82577697
...
...
@@ -90,4 +90,4 @@ class VersionViewSet(BaseModelViewSet):
ct
=
ContentType
.
objects
.
get_for_id
(
content_type_id
)
model
=
ct
.
model_class
()
obj
=
model
.
objects
.
get
(
pk
=
object_pk
)
return
Version
.
objects
.
get_for_object
(
obj
).
order_by
(
'
revision_id
'
)
return
Version
.
objects
.
get_for_object
(
obj
).
order_by
(
"
revision_id
"
)
backend/external_data/management/commands/utils.py
View file @
82577697
...
...
@@ -49,7 +49,9 @@ class FixerData(object):
with
transaction
.
atomic
():
response
=
requests
.
get
(
"http://data.fixer.io/api/latest?access_key={}"
.
format
(
self
.
FIXER_API_TOKEN
)
"http://data.fixer.io/api/latest?access_key={}"
.
format
(
self
.
FIXER_API_TOKEN
)
)
data
=
response
.
json
()
...
...
@@ -90,7 +92,8 @@ class UtcData(object):
self
.
__import_opened_destinations
,
)
paged_data_walk
(
"{}/exchanges"
.
format
(
self
.
UTC_API_ENDPOINT
),
self
.
__import_exchange_data
"{}/exchanges"
.
format
(
self
.
UTC_API_ENDPOINT
),
self
.
__import_exchange_data
,
)
paged_data_walk
(
"{}/courses"
.
format
(
self
.
UTC_API_ENDPOINT
),
self
.
__import_course_data
...
...
@@ -228,7 +231,9 @@ class UtcData(object):
),
)
# Don't forget to update the destination open status
Partner
.
objects
.
filter
(
utc_id
=
utc_partner_id
).
update
(
is_destination_open
=
True
)
Partner
.
objects
.
filter
(
utc_id
=
utc_partner_id
).
update
(
is_destination_open
=
True
)
def
__import_course_data
(
self
,
response_content
):
logger
.
info
(
"Importing courses data"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment