fix an issue when an invitation is sent without a code in signals.py