Skip to content
This repository was archived by the owner on Feb 14, 2026. It is now read-only.
This repository was archived by the owner on Feb 14, 2026. It is now read-only.

meta/catalog.latestTerm incorrectly set #37

@au5ton

Description

@au5ton

// if the catalog meta doesn't exist
if (!catalogMetaSnap.exists) {
// create catalog meta with default values (current course)
await txn.set(catalogMetaRef, {
latestTerm: record.TERM,
});
} else {
// if the catalog meta already exists, compare its term to the proposed term
if (Util.termCode(record.TERM) > catalogMetaSnap.data()!.latestTerm) {
// update the "latestTerm" value
await txn.update(catalogMetaRef, {
latestTerm: Util.termCode(record.TERM),
});
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions