Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script#show error for most_recent_job_id #2770

Closed
Tracked by #1245
Oglopf opened this issue Apr 20, 2023 · 2 comments
Closed
Tracked by #1245

Script#show error for most_recent_job_id #2770

Oglopf opened this issue Apr 20, 2023 · 2 comments
Assignees
Labels
bug Existing functionality not working as expected component/jobcomposer component/project manager
Milestone

Comments

@Oglopf
Copy link
Contributor

Oglopf commented Apr 20, 2023

While working PR #2706 and trying to use this code in the script model:

  def cache_file_path
    # Pathname.new(project_dir).join(".ondemand/scripts/#{id}_opts.json")
    # TODO: fix bug 
    Pathname.new("#{Script.scripts_dir(project_dir)}/#{id}_cache.json")
  end

And then hitting the show controller returned an error from the view stating:

undefined method `most_recent_job_id' for nil:NilClass

We used a work around for now (the commented line in this code snippet above), but this issue is to circle back later and track this down.

┆Issue is synchronized with this Asana task by Unito

@Oglopf
Copy link
Contributor Author

Oglopf commented May 22, 2023

This may be resolved with already with the addition of .compact in the commit above. Confirm and close this if so.

@Oglopf
Copy link
Contributor Author

Oglopf commented May 25, 2023

Fixed in #2823

@Oglopf Oglopf closed this as completed May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Existing functionality not working as expected component/jobcomposer component/project manager
Projects
None yet
Development

No branches or pull requests

2 participants