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

SQL error for missing fork parents #34

Open
jeffmcaffer opened this issue Oct 9, 2016 · 2 comments
Open

SQL error for missing fork parents #34

jeffmcaffer opened this issue Oct 9, 2016 · 2 comments

Comments

@jeffmcaffer
Copy link
Contributor

when ensure_repo runs on a fork, it looks to ensure the parent repo is also present. If it is not or is otherwise not available, then this line breaks with an error trying to relate foreign keys.

This scenario can happen if the parent cannot be loaded. For example, the key in use may not have permissions to that repo or there may be a transient error.

What is the right fix to do here? I have not looked at the database enough to grok all the relationships

@gousiosg
Copy link
Owner

Are you sure it breaks at L591? This is within a if parent.nil? guard that should check whether a parent can be retrieved...

@jeffmcaffer
Copy link
Contributor Author

Yes. I have since commented out that code but suspect it is actually the -1 that is the problem as I was actually getting a SQL error with the update()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants