Are you modifying the lock version?
Donald R. Mennerich, digital archivist New York University Libraries [email protected] (212) 992-6264 On Fri, Apr 17, 2020 at 10:26 AM Huebschen, Alan M <[email protected]> wrote: > Hi all, > > > > I’ve been attempting to update existing resource records through the API, > the records already exist and I’m trying to upload modified versions of the > JSON but I’m getting an error in response. > > > > *'error': 'The record you tried to update has been modified since you > fetched it.'* > > > > At first I thought this meant either user_mtime, system_mtime, or > create_time were preventing uploading an older version of the file but the > error persists after replacing all time stamps with the current date and > time. > > > > Does anyone know what this error means? > > > > Using ASnake: > > > > resources = glob.glob('./resources/modified/' + '*.json') > > > > for file in resources: > > resources_id = file.rstrip('.json') > > resources_id = re.findall('\d+', resources_id) > > resource = json.load(open(file)) > > response = client.post('repositories/2/resources/' + > resources_id[0], json=resource).json() > > > > if response.get('error') != None: > > print("*") > > print(resources_id[0]) > > print(response['error']) > > print(file) > > print("*") > > > > -Alan > _______________________________________________ > Archivesspace_Users_Group mailing list > [email protected] > > https://urldefense.proofpoint.com/v2/url?u=http-3A__lyralists.lyrasis.org_mailman_listinfo_archivesspace-5Fusers-5Fgroup&d=DwICAg&c=slrrB7dE8n7gBJbeO0g-IQ&r=_DsNVvE0MidyDzdUOYchWsIErjGtgLba7OOoi6MzJhM&m=mAyTL3XUpdR3rCWgQczVnW4usjHSykz_ZyAX8DSLHbA&s=TCqiDc22Sk_MwNFxjNgl9hkMr83FqBWe-zrDgS14iHM&e= >
_______________________________________________ Archivesspace_Users_Group mailing list [email protected] http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
