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(
109
109
authors = False ,
110
110
keepfiles = False ,
111
111
return_id = False ,
112
+ local = False ,
112
113
):
113
114
# Make a copy of the metadata to make sure our local changes don't leak
114
115
metadata = copy .deepcopy (metadata )
@@ -159,11 +160,15 @@ def caltechdata_edit(
159
160
if authors == False :
160
161
if production == True :
161
162
url = "https://data.caltech.edu/"
163
+ elif local == True :
164
+ url = "https://127.0.0.1:5000/"
162
165
else :
163
166
url = "https://data.caltechlibrary.dev/"
164
167
else :
165
168
if production == True :
166
169
url = "https://authors.library.caltech.edu/"
170
+ elif local == True :
171
+ url = "https://127.0.0.1:5000/"
167
172
else :
168
173
url = "https://authors.caltechlibrary.dev/"
169
174
Original file line number Diff line number Diff line change @@ -161,6 +161,7 @@ def caltechdata_write(
161
161
default_preview = None ,
162
162
review_message = None ,
163
163
verify = True ,
164
+ local = False ,
164
165
):
165
166
"""
166
167
File links are links to files existing in external systems that will
@@ -233,14 +234,18 @@ def caltechdata_write(
233
234
data = customize_schema .customize_schema (metadata , schema = schema )
234
235
if production == True :
235
236
url = "https://data.caltech.edu/"
237
+ elif local == True :
238
+ url = "https://127.0.0.1:5000/"
236
239
else :
237
240
url = "https://data.caltechlibrary.dev/"
238
241
else :
239
242
data = metadata
240
243
if production == True :
241
244
url = "https://authors.library.caltech.edu/"
242
- else :
245
+ elif local == True :
243
246
url = "https://127.0.0.1:5000/"
247
+ else :
248
+ url = "https://authors.caltechlibrary.dev/"
244
249
245
250
headers = {
246
251
"Authorization" : "Bearer %s" % token ,
Original file line number Diff line number Diff line change 6
6
"codeRepository" : " https://github.com/caltechlibrary/caltechdata_api" ,
7
7
"issueTracker" : " https://github.com/caltechlibrary/caltechdata_api/issues" ,
8
8
"license" : " https://data.caltech.edu/license" ,
9
- "version" : " 1.10.4 " ,
9
+ "version" : " 1.10.5 " ,
10
10
"author" : [
11
11
{
12
12
"@type" : " Person" ,
You can’t perform that action at this time.
0 commit comments