Fix migration to avoid jobType KeyError (#727)
* Fix migration to avoid KeyError * Use .get() for other optional fields
This commit is contained in:
parent
bca67c74e2
commit
e293e98ac3
@ -63,10 +63,10 @@ class Migration(BaseMigration):
|
|||||||
{
|
{
|
||||||
"$set": {
|
"$set": {
|
||||||
"config": config_result["config"],
|
"config": config_result["config"],
|
||||||
"profileid": config_result["profileid"],
|
"profileid": config_result.get("profileid"),
|
||||||
"schedule": config_result["schedule"],
|
"schedule": config_result.get("schedule"),
|
||||||
"crawlTimeout": config_result["crawlTimeout"],
|
"crawlTimeout": config_result.get("crawlTimeout"),
|
||||||
"jobType": config_result["jobType"],
|
"jobType": config_result.get("jobType"),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user