It states on the BA baggage page at
https://www.britishairways.com/en-gb...age-allowances
Originally Posted by BA
•If every flight in your journey has a BA code (e.g. BA1234) you will get British Airways’ checked baggage allowance, even if some or all of the flights are operated by other airlines (so-called 'codeshare' flights).
•If every flight in your journey has another airline’s code, you will get that airline’s baggage allowance.
•If your journey includes a mix of BA and other airline codes (e.g. AA1122 or IB3210) you will get the allowance of the most significant carrier – usually the airline operating the longest part of the journey.
Assuming that you are just travelling from Riga to Gatwick on a BA codeshare, then the 1st rule will apply and so BA's allowance will apply