55
66floors = [
77 (1 , "Berlin Intercontinental Floor 1" , 1 , 'floor/floorplan-96-berlin-intercontinental-floor-1.jpg' ),
8- (2 , "Berlin Intercontinental Floor 1 " , 2 , 'floor/floorplan-96-berlin-intercontinental-floor-2.jpg' ),
9- (3 , "Berlin Intercontinental Floor 1 " , 14 , 'floor/floorplan-96-berlin-intercontinental-floor-14.jpg' ),
8+ (2 , "Berlin Intercontinental Floor 2 " , 2 , 'floor/floorplan-96-berlin-intercontinental-floor-2.jpg' ),
9+ (3 , "Berlin Intercontinental Floor 14 " , 14 , 'floor/floorplan-96-berlin-intercontinental-floor-14.jpg' ),
1010]
1111
1212rooms = [
13- ("Bellevue" , 1 , 176 , 1348 , 324 , 1526 ),
14- ("Kaminzimmer " , 1 , 696 , 820 , 812 , 1038 ),
15- ("Charlottenburg I" , 1 , 374 , 320 , 528 , 400 ),
13+ ("Bellevue" , 1 , 176 , 1348 , 324 , 1526 ),
14+ ("Bishop " , 2 , 802 , 1269 , 890 , 1390 , ),
15+ ("Charlottenburg I" , 1 , 374 , 320 , 528 , 400 ),
1616 ("Charlottenburg II/III" , 1 , 374 , 172 , 528 , 316 ),
17- ("Chess" , 2 , 238 , 614 , 336 , 782 ),
18- ("Glienicke" , 1 , 228 , 1251 , 324 , 1310 ),
19- ("Hugos 360" , 3 , 801 , 1346 , 976 , 1509 ),
20- ("King" , 2 , 802 , 1389 , 890 , 1508 ),
21- ("Koepenick I/II" , 1 , 370 , 453 , 458 , 602 ),
22- ("Lincke" , 2 , 40 , 99 , 532 , 166 ),
23- ("Potsdam I" , 1 , 1228 , 790 , 1550 , 994 ),
24- ("Potsdam I/III" , 1 , 1017 , 792 , 1550 , 994 ),
25- ("Potsdam II" , 1 , 1311 , 1036 , 1536 , 1142 ),
26- ("Potsdam III" , 1 , 1017 , 792 , 1228 , 987 ),
27- ("Rook" , 2 , 915 , 1150 , 1004 , 1269 ),
28- ("Schoeneberg" , 1 , 369 , 42 , 534 , 126 ),
29- ("Tegel" , 1 , 201 , 1088 , 326 , 1184 ),
30- ("Tiergarten" , 1 , 240 , 612 , 334 , 780 ),
17+ ("Chess" , 2 , 802 , 1150 , 890 , 1264 ),
18+ ("Dahlem" , 1 , 201 , 1035 , 324 , 1086 ),
19+ ("Glienicke" , 1 , 228 , 1251 , 324 , 1310 ),
20+ ("Hugos 360" , 3 , 801 , 1346 , 976 , 1509 ),
21+ ("Kaminzimmer" , 1 , 696 , 820 , 812 , 1038 ),
22+ ("King" , 2 , 802 , 1389 , 890 , 1508 ),
23+ ("Koepenick I/II" , 1 , 370 , 453 , 458 , 602 ),
24+ ("Koepenick III" , 1 , 456 , 440 , 540 , 526 ),
25+ ("Lincke" , 2 , 365 , 111 , 531 , 171 ),
26+ ("Potsdam I" , 1 , 1228 , 790 , 1550 , 994 ),
27+ ("Potsdam I/III" , 1 , 1017 , 792 , 1550 , 994 ),
28+ ("Potsdam II" , 1 , 1311 , 1036 , 1536 , 1142 ),
29+ ("Potsdam III" , 1 , 1017 , 792 , 1228 , 987 ),
30+ ("Rook" , 2 , 915 , 1150 , 1004 , 1269 ),
31+ ("Schinkel I/II" , 2 , 532 , 222 , 594 , 360 ),
32+ ("Schinkel III" , 2 , 532 , 112 , 592 , 222 ),
33+ ("Schoeneberg" , 1 , 369 , 42 , 534 , 126 ),
34+ ("Tegel" , 1 , 201 , 1088 , 326 , 1184 ),
35+ ("Tiergarten" , 1 , 240 , 612 , 334 , 780 ),
3136 ("Wintergarten/Pavillion" , 1 , 466 , 1038 , 711 , 1504 ),
3237]
3338
@@ -43,13 +48,17 @@ def forward(apps, schema_editor):
4348
4449 for item in rooms :
4550 name , floor_id , x1 , y1 , x2 , y2 = item
46- room = Room .objects .get (name = name , meeting = meeting )
47- room .floorplan_id = floor_id
48- room .x1 = x1
49- room .y1 = y1
50- room .x2 = x2
51- room .y2 = y2
52- room .save ()
51+ try :
52+ room = Room .objects .get (name = name , meeting = meeting )
53+ room .floorplan_id = floor_id
54+ room .x1 = x1
55+ room .y1 = y1
56+ room .x2 = x2
57+ room .y2 = y2
58+ room .save ()
59+ except Room .DoesNotExist :
60+ import sys
61+ sys .stderr .write ("\n No such room: %s" % name )
5362
5463def backward (apps , schema_editor ):
5564 pass
0 commit comments