def command(self): self.load_wsgi_app() plate_id = self.args[0] plate_setup_id = self.args[1] plate = Session.query(Plate).get(plate_id) plate_setup = Session.query(PlateSetup).get(plate_setup_id) if plate and plate_setup: inherit_setup_attributes(plate, plate_setup) trigger_plate_rescan(plate) # in case metrics need recalc Session.commit() print "Plate linked." else: print "Plate or setup not found (%s, %s)" % (plate_id, plate_setup_id)
def command(self): self.load_wsgi_app() # TODO: this might be better with keywords plate_id = self.args[0] plate_template_id = self.args[1] plate = Session.query(Plate).get(plate_id) plate_template = Session.query(PlateTemplate).get(plate_template_id) if plate and plate_template: inherit_template_attributes(plate, plate_template) trigger_plate_rescan(plate) # in case metrics need recalc Session.commit() print "Plate linked." else: print "Plate or template not found: (%s,%s)" % (plate_id, plate_template_id)