AFRINIC and RIPE NCC are two different WHOIS databases. Objects in the AFRINIC database will have the suffix "-AFRINIC" while RIPE will have the suffix "-RIPE-NOAUTH" which will be filtered.
So, the objects can't be used interchangeably and the route objects must be created in the AFRINIC database.