Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
onelab
myslicelib
Commits
43234e21
Commit
43234e21
authored
Mar 15, 2019
by
Albert
Browse files
fixed an issue when location is not specified
parent
34d39f99
Pipeline
#2827
failed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
myslicelib/model/resource.py
View file @
43234e21
...
...
@@ -15,7 +15,9 @@ class Resource(Entity):
def
__init__
(
self
,
data
=
{}):
if
'location'
in
data
:
# infere the city/country based on coordinates
data
[
'location'
]
=
self
.
get_address
(
HDict
(
data
[
'location'
]))
if
'location'
in
data
and
data
[
'location'
]:
data
[
'location'
]
=
self
.
get_address
(
HDict
(
data
[
'location'
]))
# infere coordinates from the city/country
#location = get_coordinates(location)
super
().
__init__
(
data
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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