def update_from_shot_slug(device_slug, shot_slug): from h1ds_summary.db import SummaryTable device = Device(slug=device_slug) db = SummaryTable(device) for shot in parse_shot_slug(device, shot_slug): db.add_or_update_shot(shot)
def get_cleaned_data_for_device(self, device): cleaned_data = self.clean() cleaned_data['shots'] = parse_shot_slug(device, cleaned_data['shots']) cleaned_data['attributes'] = parse_attr_str(device, cleaned_data['attributes']) return cleaned_data