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

restapi: prefer parentType over subclasses in getParent #320

Merged
merged 1 commit into from
May 2, 2022

Commits on May 2, 2022

  1. restapi: prefer parentType over subclasses in getParent

    Currently LinkHelper#getParent may return subclasses even if the
    parentType exists in the methods list.
    
    This makes the returned resource unpredicatble as the method list does
    not have any guaranteed order.
    
    To fix this, this patch tries to match parentType first, and only if it
    is not in the list it will fallback to a subclass.
    
    Bug-Url: https://bugzilla.redhat.com/2080728
    Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
    bennyz committed May 2, 2022
    Configuration menu
    Copy the full SHA
    5416638 View commit details
    Browse the repository at this point in the history