Skip to content

Fix 'old player' issue in match_player_stats.js #4

Description

@ryzhak

Sometimes in match stats there is a player that plays for one team in match stats API but in season squad this player is registered in another team. There should be a way to fix it neatly.

// TODO: fix neatly
	// if player is registered in other club then this is API issue, skip such players
	let clubPlayerOld = (await db.query(`SELECT * FROM club_player WHERE player_id = ? AND season_id = ?`, [playerId, seasonId]))[0];
	if (!clubPlayer && clubPlayerOld) return;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions