File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -109,6 +109,7 @@ def caltechdata_edit(
109109 authors = False ,
110110 keepfiles = False ,
111111 return_id = False ,
112+ local = False ,
112113):
113114 # Make a copy of the metadata to make sure our local changes don't leak
114115 metadata = copy .deepcopy (metadata )
@@ -159,11 +160,15 @@ def caltechdata_edit(
159160 if authors == False :
160161 if production == True :
161162 url = "https://data.caltech.edu/"
163+ elif local == True :
164+ url = "https://127.0.0.1:5000/"
162165 else :
163166 url = "https://data.caltechlibrary.dev/"
164167 else :
165168 if production == True :
166169 url = "https://authors.library.caltech.edu/"
170+ elif local == True :
171+ url = "https://127.0.0.1:5000/"
167172 else :
168173 url = "https://authors.caltechlibrary.dev/"
169174
Original file line number Diff line number Diff line change @@ -161,6 +161,7 @@ def caltechdata_write(
161161 default_preview = None ,
162162 review_message = None ,
163163 verify = True ,
164+ local = False ,
164165):
165166 """
166167 File links are links to files existing in external systems that will
@@ -233,14 +234,18 @@ def caltechdata_write(
233234 data = customize_schema .customize_schema (metadata , schema = schema )
234235 if production == True :
235236 url = "https://data.caltech.edu/"
237+ elif local == True :
238+ url = "https://127.0.0.1:5000/"
236239 else :
237240 url = "https://data.caltechlibrary.dev/"
238241 else :
239242 data = metadata
240243 if production == True :
241244 url = "https://authors.library.caltech.edu/"
242- else :
245+ elif local == True :
243246 url = "https://127.0.0.1:5000/"
247+ else :
248+ url = "https://authors.caltechlibrary.dev/"
244249
245250 headers = {
246251 "Authorization" : "Bearer %s" % token ,
Original file line number Diff line number Diff line change 66 "codeRepository" : " https://github.com/caltechlibrary/caltechdata_api" ,
77 "issueTracker" : " https://github.com/caltechlibrary/caltechdata_api/issues" ,
88 "license" : " https://data.caltech.edu/license" ,
9- "version" : " 1.10.4 " ,
9+ "version" : " 1.10.5 " ,
1010 "author" : [
1111 {
1212 "@type" : " Person" ,
You can’t perform that action at this time.
0 commit comments