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

fix: DataType.prototype.getByVersionId could return wrong type #963

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Nov 14, 2024

  1. fix: DataType.prototype.getByVersionId could return wrong type

    We have many `DataType`s backed by the same `DataStore`. For example,
    observations and tracks are both in the "data" store.
    
    `DataType.prototype.getByVersionId` would pull documents from the store
    without checking the type, which could cause issues. Simple code
    example:
    
        const track = await trackDataType.create({ /* ... */ })
    
        await observationDataType.getByVersionId(track.versionId)
        // => the track, unexpectedly!
    
    Now, it throws a `NotFoundError`.
    EvanHahn committed Nov 14, 2024
    Configuration menu
    Copy the full SHA
    b5a797a View commit details
    Browse the repository at this point in the history

Commits on Nov 18, 2024

  1. Configuration menu
    Copy the full SHA
    ebe868e View commit details
    Browse the repository at this point in the history