mirror of
https://github.com/sartography/uva-covid19-testing-communicator.git
synced 2025-02-24 04:48:05 +00:00
Added api endpoint
This commit is contained in:
parent
6007a17be1
commit
41dda2b977
@ -16,15 +16,16 @@ class SampleService(object):
|
||||
db.session.commit()
|
||||
|
||||
def split_location_column(self):
|
||||
samples = db.session.query(Sample).filter(Sample.station == None).all()
|
||||
samples = db.session.query(Sample).all()
|
||||
for sample in samples:
|
||||
loc_code = str(sample.location)
|
||||
if len(loc_code) == 4:
|
||||
location, station = int(loc_code[:2]), int(loc_code[2:])
|
||||
sample.location, sample.station = location, station
|
||||
sample.station = station
|
||||
elif len(loc_code) == 3:
|
||||
location, station = int(loc_code[:1]), int(loc_code[1:])
|
||||
sample.location, sample.station = location, station
|
||||
sample.station = station
|
||||
sample.location = 1
|
||||
db.session.commit()
|
||||
|
||||
def merge_similar_records(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user