Just had this happen a little bit ago, but if you get knocked off your K-Drive right at the end of a race and it completes the race, you won't be awarded the affinity from the race.
The "Finish" banner that typically pops up at the top did not appear either.
I was not capped on affinity (did a race right after to confirm everything was alright even though I knew I hadn't gained close to my cap).