Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scheduling-system
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SMASCH
scheduling-system
Commits
7557430d
Commit
7557430d
authored
4 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
new location is added, fix on bug with prefixes
parent
2f6ee01f
No related branches found
No related tags found
1 merge request
!243
new location is added, fix on bug with prefixes
Pipeline
#25358
passed
4 years ago
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
smash/web/importer/csv_tns_visit_import_reader.py
+71
-68
71 additions, 68 deletions
smash/web/importer/csv_tns_visit_import_reader.py
with
71 additions
and
68 deletions
smash/web/importer/csv_tns_visit_import_reader.py
+
71
−
68
View file @
7557430d
...
@@ -136,74 +136,76 @@ class TnsCsvVisitImportReader:
...
@@ -136,74 +136,76 @@ class TnsCsvVisitImportReader:
if
text
is
None
:
if
text
is
None
:
text
=
data
[
'
lab_id
'
]
text
=
data
[
'
lab_id
'
]
if
text
.
startswith
(
'
lab-reunis-1
'
):
if
text
==
'
lab-reunis-1
'
:
text
=
'
Laboratoires réunis, 23 Route de Diekirch, 6555, Bollendorf-Pont
'
text
=
'
Laboratoires réunis, 23 Route de Diekirch, 6555, Bollendorf-Pont
'
if
text
.
startswith
(
'
lab-reunis-2
'
):
if
text
==
'
lab-reunis-2
'
:
text
=
'
Laboratoires réunis, 38 Rue Hiehl, 6131, Junglinster
'
text
=
'
Laboratoires réunis, 38 Rue Hiehl, 6131, Junglinster
'
if
text
.
startswith
(
'
lab-reunis-3
'
):
if
text
==
'
lab-reunis-3
'
:
text
=
'
Laboratoires réunis, 16 Rue de la Gare, 6117, Junglinster
'
text
=
'
Laboratoires réunis, 16 Rue de la Gare, 6117, Junglinster
'
if
text
.
startswith
(
'
lab-reunis-4
'
):
if
text
==
'
lab-reunis-4
'
:
text
=
'
Laboratoires réunis, 456 Rue de Neudorf, 2222, Luxembourg
'
text
=
'
Laboratoires réunis, 456 Rue de Neudorf, 2222, Luxembourg
'
if
text
.
startswith
(
'
lab-reunis-5
'
):
if
text
==
'
lab-reunis-5
'
:
text
=
'
Laboratoires réunis, 14 Place St Michel, 7556, Mersch
'
text
=
'
Laboratoires réunis, 14 Place St Michel, 7556, Mersch
'
if
text
.
startswith
(
'
lab-reunis-6
'
):
if
text
==
'
lab-reunis-6
'
:
text
=
'
Laboratoires réunis, 2 Avenue des Bains, 5610, Mondorf-les-Bains
'
text
=
'
Laboratoires réunis, 2 Avenue des Bains, 5610, Mondorf-les-Bains
'
if
text
.
startswith
(
'
lab-reunis-7
'
):
if
text
==
'
lab-reunis-7
'
:
text
=
'
Laboratoires réunis, 239 Route d
\'
Arlon, 8011, Strassen
'
text
=
'
Laboratoires réunis, 239 Route d
\'
Arlon, 8011, Strassen
'
if
text
.
startswith
(
'
lab-reunis-8
'
):
if
text
==
'
lab-reunis-8
'
:
text
=
'
Laboratoires réunis, 123 Route de Diekirch, 7220, Walferdange
'
text
=
'
Laboratoires réunis, 123 Route de Diekirch, 7220, Walferdange
'
if
text
.
startswith
(
'
lab-reunis-9
'
):
if
text
==
'
lab-reunis-9
'
:
text
=
'
Laboratoires réunis, 20 Rue de Luxembourg, 4220, Esch-sur-Alzette
'
text
=
'
Laboratoires réunis, 20 Rue de Luxembourg, 4220, Esch-sur-Alzette
'
if
text
.
startswith
(
'
lab-reunis-10
'
):
if
text
==
'
lab-reunis-10
'
:
text
=
'
Laboratoires réunis, 124 Avenue de Luxembourg, 4940, Bascharage
'
text
=
'
Laboratoires réunis, 124 Avenue de Luxembourg, 4940, Bascharage
'
if
text
.
startswith
(
'
lab-reunis-11
'
):
if
text
==
'
lab-reunis-11
'
:
text
=
'
Laboratoires réunis, 1 Marbuergerstrooss, 9764, Marnach
'
text
=
'
Laboratoires réunis, 1 Marbuergerstrooss, 9764, Marnach
'
if
text
.
startswith
(
'
lab-reunis-12
'
):
if
text
==
'
lab-reunis-12
'
:
text
=
'
Laboratoires réunis, 51 Avenue Lucien Salentiny, 9080, Ettelbruck
'
text
=
'
Laboratoires réunis, 51 Avenue Lucien Salentiny, 9080, Ettelbruck
'
if
text
.
startswith
(
'
lab-reunis-13
'
):
if
text
==
'
lab-reunis-13
'
:
text
=
'
Laboratoires réunis, 14 route de l
\'
Europe, 5531, Remich
'
text
=
'
Laboratoires réunis, 14 route de l
\'
Europe, 5531, Remich
'
if
text
.
startswith
(
'
lab-reunis-14
'
):
if
text
==
'
lab-reunis-14
'
:
text
=
'
Laboratoires réunis, 27, rue Principale, 5240, Sandweiler
'
text
=
'
Laboratoires réunis, 27, rue Principale, 5240, Sandweiler
'
if
text
.
startswith
(
'
lab-reunis-15
'
):
if
text
==
'
lab-reunis-15
'
:
text
=
'
Laboratoires réunis, booking by phone 780 290-1, ,
'
text
=
'
Laboratoires réunis, booking by phone 780 290-1, ,
'
if
text
.
startswith
(
'
lab-bionext-16
'
):
if
text
==
'
lab-bionext-16
'
:
text
=
'
BioneXt, 2 Rue du Chateau d
\'
Eau, 3364, Leudelange
'
text
=
'
BioneXt, 2 Rue du Chateau d
\'
Eau, 3364, Leudelange
'
if
text
.
startswith
(
'
lab-bionextpd-17
'
):
if
text
==
'
lab-bionextpd-17
'
:
text
=
'
BioneXt, PickenDoheem
'
text
=
'
BioneXt, PickenDoheem
'
if
text
.
startswith
(
'
lab-ketterthill-18
'
):
if
text
==
'
lab-ketterthill-18
'
:
text
=
'
Ketterthill, 11, rue Schwaarze Wee , 3474, Dudelange
'
text
=
'
Ketterthill, 11, rue Schwaarze Wee , 3474, Dudelange
'
if
text
.
startswith
(
'
lab-ketterthill-19
'
):
if
text
==
'
lab-ketterthill-19
'
:
text
=
'
Ketterthill, 52, bd J.-F. Kennedy , 4170, Esch-sur-Alzette
'
text
=
'
Ketterthill, 52, bd J.-F. Kennedy , 4170, Esch-sur-Alzette
'
if
text
.
startswith
(
'
lab-ketterthill-20
'
):
if
text
==
'
lab-ketterthill-20
'
:
text
=
'
Ketterthill, 7, route de Bettembourg , 5810, Hesperange
'
text
=
'
Ketterthill, 7, route de Bettembourg , 5810, Hesperange
'
if
text
.
startswith
(
'
lab-ketterthill-21
'
):
if
text
==
'
lab-ketterthill-21
'
:
text
=
'
Ketterthill, Avenue des Bains (Dom. Thermal) , 5601, Mondorf-les-Bains
'
text
=
'
Ketterthill, Avenue des Bains (Dom. Thermal) , 5601, Mondorf-les-Bains
'
if
text
.
startswith
(
'
lab-ketterthill-22
'
):
if
text
==
'
lab-ketterthill-22
'
:
text
=
'
Ketterthill, 8, avenue du Swing , 4367, Belvaux
'
text
=
'
Ketterthill, 8, avenue du Swing , 4367, Belvaux
'
if
text
.
startswith
(
'
lab-ketterthill-23
'
):
if
text
==
'
lab-ketterthill-23
'
:
text
=
'
Ketterthill, 1-3, rue de la Continentale , 4917, Bascharage
'
text
=
'
Ketterthill, 1-3, rue de la Continentale , 4917, Bascharage
'
if
text
.
startswith
(
'
lab-ketterthill-24
'
):
if
text
==
'
lab-ketterthill-24
'
:
text
=
'
Ketterthill, 14, rue d
\'
Esch, 3920, Mondercange
'
text
=
'
Ketterthill, 14, rue d
\'
Esch, 3920, Mondercange
'
if
text
.
startswith
(
'
lab-ketterthill-25
'
):
if
text
==
'
lab-ketterthill-25
'
:
text
=
'
Ketterthill, 21, rue d
\'
Orval , 2270, Luxembourg
'
text
=
'
Ketterthill, 21, rue d
\'
Orval , 2270, Luxembourg
'
if
text
.
startswith
(
'
lab-ketterthill-26
'
):
if
text
==
'
lab-ketterthill-26
'
:
text
=
'
Ketterthill, 24, rue Glesener , 1630, Luxembourg
'
text
=
'
Ketterthill, 24, rue Glesener , 1630, Luxembourg
'
if
text
.
startswith
(
'
lab-ketterthill-27
'
):
if
text
==
'
lab-ketterthill-27
'
:
text
=
'
Ketterthill, 36, avenue Victor Hugo , 1750, Luxembourg
'
text
=
'
Ketterthill, 36, avenue Victor Hugo , 1750, Luxembourg
'
if
text
.
startswith
(
'
lab-ketterthill-28
'
):
if
text
==
'
lab-ketterthill-28
'
:
text
=
'
Ketterthill, 70, rue de Luxembourg , 8140, Bridel
'
text
=
'
Ketterthill, 70, rue de Luxembourg , 8140, Bridel
'
if
text
.
startswith
(
'
lab-ketterthill-29
'
):
if
text
==
'
lab-ketterthill-29
'
:
text
=
'
Ketterthill, 15, rue Edward Steichen , 2540, Luxembourg
'
text
=
'
Ketterthill, 15, rue Edward Steichen , 2540, Luxembourg
'
if
text
.
startswith
(
'
lab-ketterthill-30
'
):
if
text
==
'
lab-ketterthill-30
'
:
text
=
'
Ketterthill, 29, rue Cents , 1319, Luxembourg
'
text
=
'
Ketterthill, 29, rue Cents , 1319, Luxembourg
'
if
text
.
startswith
(
'
lab-ketterthill-31
'
):
if
text
==
'
lab-ketterthill-31
'
:
text
=
'
Ketterthill, 155, rue Lucien Salentiny , 9080, Ettelbruck
'
text
=
'
Ketterthill, 155, rue Lucien Salentiny , 9080, Ettelbruck
'
if
text
.
startswith
(
'
lab-ketterthill-32
'
):
if
text
==
'
lab-ketterthill-32
'
:
text
=
'
Ketterthill, 12, rue G.-D. Charlotte , 7520, Mersch
'
text
=
'
Ketterthill, 12, rue G.-D. Charlotte , 7520, Mersch
'
if
text
.
startswith
(
'
lab-ketterthill-33
'
):
if
text
==
'
lab-ketterthill-33
'
:
text
=
'
Ketterthill, 18, rue de la Piscine , 8508, Redange-sur-Atert
'
text
=
'
Ketterthill, 18, rue de la Piscine , 8508, Redange-sur-Atert
'
if
text
.
startswith
(
'
lab-ketterthill-34
'
):
if
text
==
'
lab-ketterthill-34
'
:
text
=
'
Ketterthill, 19, rue Grande-Duchesse Charlotte , 9515, Wiltz
'
text
=
'
Ketterthill, 19, rue Grande-Duchesse Charlotte , 9515, Wiltz
'
if
text
==
'
lab-reunis-37
'
:
text
=
'
Laboratoires réunis, 5, route de Trèves , 6793, Grevenmacher
'
locations
=
Location
.
objects
.
filter
(
name
=
text
)
locations
=
Location
.
objects
.
filter
(
name
=
text
)
if
len
(
locations
)
>
0
:
if
len
(
locations
)
>
0
:
return
locations
[
0
]
return
locations
[
0
]
...
@@ -224,5 +226,6 @@ class TnsCsvVisitImportReader:
...
@@ -224,5 +226,6 @@ class TnsCsvVisitImportReader:
result
+=
"
<p><font
"
+
style
+
"
>Number of raised warnings: <b>
"
+
str
(
self
.
warning_count
)
+
"
</b></font></p>
"
result
+=
"
<p><font
"
+
style
+
"
>Number of raised warnings: <b>
"
+
str
(
self
.
warning_count
)
+
"
</b></font></p>
"
return
result
return
result
def
remove_bom
(
line
):
def
remove_bom
(
line
):
return
line
[
3
:]
if
line
.
startswith
(
codecs
.
BOM_UTF8
)
else
line
return
line
[
3
:]
if
line
.
startswith
(
codecs
.
BOM_UTF8
)
else
line
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment