Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Commit

Permalink
add track tag to type
Browse files Browse the repository at this point in the history
  • Loading branch information
gferraro committed Jul 20, 2021
1 parent 14b3db0 commit bf7a783
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion api/V1/recordingUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,7 @@ async function sendAlerts(recID: number) {
let matchedTrack, matchedTag;
// find any ai master tags that match the visit tag
for (const track of recording.Tracks) {
matchedTag = (track as any).TrackTags.find(
matchedTag = track.TrackTags.find(
(tag) => tag.data == AI_MASTER && recVisit.what == tag.what
);
if (matchedTag) {
Expand Down
2 changes: 2 additions & 0 deletions models/Track.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ export interface Track extends Sequelize.Model, ModelCommon<Track> {
) => Promise<TrackTag>;
// NOTE: Implicitly created by sequelize associations.
getRecording: () => Promise<Recording>;

TrackTags?: TrackTag[];
}
export interface TrackStatic extends ModelStaticCommon<Track> {
replaceTag: (id: TrackId, tag: TrackTag) => Promise<any>;
Expand Down

0 comments on commit bf7a783

Please sign in to comment.