Your best bet is probably to rest, but check with your doctor to be sure.
The good news is that when it comes to weight loss, the majority of your progress comes from diet, not exercise. So as long as you're careful with tracking and stay in your recommended calorie and nutrient ranges, you can still lose weight consistently even if you can't exercise at all.
Hope that helps,
"You may have a fresh start any moment you choose, for this thing that we call "failure" is not the falling down but the staying down." Mary Pickford