yasithdev opened a new pull request, #224:
URL: https://github.com/apache/airavata-portals/pull/224

   `ParserEditContainer.mounted()` always called `ParserService.retrieve({ 
lookup: this.parserId })`, but the create page (`/dataparsers/create/`) mounts 
the container with no `parserId` (the entry point defaults it to `null` and 
only sets it from a non-empty `data-parser-id`). The request therefore went out 
as `GET /api/parsers/null/` and the server returned `Error retrieving parser 
with id: null: No Parser Info entry exists for null`.
   
   Fetch only when a `parserId` is present; otherwise start from an empty 
`models.Parser()` so the editor renders for a new parser. Also relaxes the 
`parserId` prop from `required` to `default: null` (the create page 
legitimately passes none).
   
   Test plan: `/dataparsers/edit/<id>/` still loads the existing parser; 
`/dataparsers/create/` renders an empty editor without issuing a null parser 
fetch.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to