Skip to content

fix: add null check to guest to allow the repair step to continue - #1425

Closed
yemkareems wants to merge 1 commit into
mainfrom
fix/add-null-check
Closed

fix: add null check to guest to allow the repair step to continue#1425
yemkareems wants to merge 1 commit into
mainfrom
fix/add-null-check

Conversation

@yemkareems

Copy link
Copy Markdown

In few cases when guest is null this breaks the repair step and occ upgrade fails.

Signed-off-by: yemkareems <yemkareems@gmail.com>
@yemkareems yemkareems self-assigned this Oct 8, 2025
@yemkareems yemkareems added the 3. to review Waiting for reviews label Oct 8, 2025
@yemkareems
yemkareems requested a review from icewind1991 October 8, 2025 04:06
@kesselb

kesselb commented Oct 8, 2025

Copy link
Copy Markdown
Contributor

Duplicate of #1425 #1424?

@provokateurin

Copy link
Copy Markdown
Member

@kesselb your link is just the link to this PR?

Comment on lines +42 to +43
if ($guest === null) {
continue;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the guest get deleted as well, if this case is detected? I don't know anything about this app, but find it a bit strange that there can be a guest without a user. I assume this happens when the user is deleted? Please provide a little more insight here.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are asking the guests manager for a list of guests and then obtaining the user object from the user backend. The guests app itself implements a user backend, and thus it's indeed weird that we cannot find the user again that was just returned by the other call. The change here ensures that the repair step runs through and does not brick the update.

@kesselb

kesselb commented Oct 8, 2025

Copy link
Copy Markdown
Contributor

Thanks @provokateurin for the heads-up, I'v indeed mixed up the links ;) It's #1424.

@provokateurin

Copy link
Copy Markdown
Member

Yeah let's go with that PR as it also includes logging for this weird issue.

@github-actions

Copy link
Copy Markdown
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

@kesselb
kesselb deleted the fix/add-null-check branch January 16, 2026 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants