Skip to content

Commit 05793a6

Browse files
committed
Save records as ImportBot
1 parent 0dc49de commit 05793a6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • openlibrary/plugins/openlibrary

openlibrary/plugins/openlibrary/api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1159,7 +1159,8 @@ def POST(self):
11591159
def link(edition, ocaid):
11601160
data = edition.dict()
11611161
data["ocaid"] = ocaid
1162-
web.ctx.site.save(data, "Associate OCAID with record", action="edit-edition-ocaid")
1162+
with accounts.RunAs("ImportBot"):
1163+
web.ctx.site.save(data, "Associate OCAID with record", action="edit-edition-ocaid")
11631164

11641165

11651166
class monthly_logins(delegate.page):

0 commit comments

Comments
 (0)