.
This commit is contained in:
+7
-5
@@ -372,17 +372,19 @@ class LongSeries(models.Model):
|
|||||||
for i, f in files:
|
for i, f in files:
|
||||||
if hasattr(f, field):
|
if hasattr(f, field):
|
||||||
slices.append(f)
|
slices.append(f)
|
||||||
map[f.SliceLocation] = i
|
#map[f.SliceLocation] = i
|
||||||
|
map[f[field].value] = i
|
||||||
else:
|
else:
|
||||||
skipcount = skipcount + 1
|
skipcount = skipcount + 1
|
||||||
|
|
||||||
print("skipped, no SliceLocation: {}".format(skipcount))
|
print("skipped, no SliceLocation: {}".format(skipcount))
|
||||||
|
|
||||||
# ensure they are in the correct order
|
# ensure they are in the correct order
|
||||||
if field == "SliceLocation":
|
slices = sorted(slices, key=lambda s: s[field].value)
|
||||||
slices = sorted(slices, key=lambda s: s.SliceLocation)
|
#if field == "SliceLocation":
|
||||||
elif field == "InstanceNumber":
|
# slices = sorted(slices, key=lambda s: s.SliceLocation)
|
||||||
slices = sorted(slices, key=lambda s: s.InstanceNumber)
|
#elif field == "InstanceNumber":
|
||||||
|
# slices = sorted(slices, key=lambda s: s.InstanceNumber)
|
||||||
|
|
||||||
|
|
||||||
#print(slices)
|
#print(slices)
|
||||||
|
|||||||
Reference in New Issue
Block a user