mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Fix validation of project-output-file, no build_id for imported v1 projects
This commit is contained in:
parent
f6424ada40
commit
04be842b30
2 changed files with 12 additions and 7 deletions
|
@ -93,8 +93,14 @@ module.exports = ProjectOutputFileAgent = {
|
|||
_getSourceProject: LinkedFilesHandler.getSourceProject
|
||||
|
||||
_validate: (data) ->
|
||||
return (
|
||||
(data.source_project_id? || data.v1_source_doc_id?) &&
|
||||
if data.v1_source_doc_id?
|
||||
(
|
||||
data.v1_source_doc_id? &&
|
||||
data.source_output_file_path?
|
||||
)
|
||||
else
|
||||
(
|
||||
data.source_project_id? &&
|
||||
data.source_output_file_path? &&
|
||||
data.build_id?
|
||||
)
|
||||
|
|
|
@ -428,8 +428,7 @@ describe "LinkedFiles", ->
|
|||
linkedFileData: {
|
||||
provider: "project_output_file",
|
||||
v1_source_doc_id: 9999999, # We won't find this id in the database
|
||||
source_output_file_path: "project.pdf",
|
||||
build_id: '123'
|
||||
source_output_file_path: "project.pdf"
|
||||
},
|
||||
_id: "abcdef",
|
||||
rev: 0,
|
||||
|
|
Loading…
Reference in a new issue