I asssume ,by following the below procedure, you can retract the flaps regardless of whether the cargo door is open or not. PRO SUP-91
After landing:
To avoid damage on the slats/flaps mechanism, do not retract the slats/flaps.
After engine shutdown:
Make a visual inspection to determine that the slats/flaps mechanism is free of
contamination.
When the slats/flaps mechanism is clean and before the flight crew shuts
down the aircraft electrical network:
YELLOW ELEC PUMP pb ............................................................ .........................ON
BLUE ELEC PUMP pb-sw ............................................................ .................... AUTO
BLUE PUMP OVRD pb ............................................................ ............................. ON
SLATS/FLAPS.......................................... RETRACT and MONITOR on ECAM page
YELLOW ELEC PUMP pb ............................................................ ....................... OFF
BLUE PUMP OVRD pb ............................................................ ............................OFF
NORMAL PROCEDURE................................................... ............................ RESUM