def update_productions(self, irrad, level, production, note=None, add=True):
    p = os.path.join(paths.meta_root, irrad, 'productions.json')
    obj = dvc_load(p)
    obj['note'] = (str(note) or '')
    if (level in obj):
        if (obj[level] != production):
            self.debug('setting production to irrad={}, level={}, prod={}'.format(irrad, level, production))
            obj[level] = production
            dvc_dump(obj, p)
            if add:
                self.add(p, commit=False)
    else:
        obj[level] = production
        dvc_dump(obj, p)
        if add:
            self.add(p, commit=False)
def update_productions(self, irrad, level, production, note=None, add=True):
    p = os.path.join(paths.meta_root, irrad, 'productions.json')
    obj = dvc_load(p)
    obj['note'] = (str(note) or )
    if (level in obj):
        if (obj[level] != production):
            self.debug('setting production to irrad={}, level={}, prod={}'.format(irrad, level, production))
            obj[level] = production
            dvc_dump(obj, p)
            if add:
                self.add(p, commit=False)
    else:
        obj[level] = production
        dvc_dump(obj, p)
        if add:
            self.add(p, commit=False)