Fehler bei Vergabe von Bonuspunkte korrigiert.

Kommentare für Bonuspunkte werden jetzt als Kommentar beim Spieler hinterlassen, nicht als Kommentar in der Hanchan.
FIXED: 3_in_a_row counter wurde nicht zurückgesetzt wenn Bonuspunkte vergeben wurden.
FIXED: Durchschnittliche Platzierung während eines Events wurde nur als Ganzzahl berechnet. Wird nun als Fießkomma berechnet und gesichert.
This commit is contained in:
Christian Berg
2016-01-09 22:55:26 +01:00
parent 088efe2f39
commit b1586efbab
155 changed files with 2571 additions and 2835 deletions

View File

@@ -23,33 +23,32 @@ class MembershipForm(forms.ModelForm):
fields = (
'username', 'gender', 'first_name', 'last_name', 'email', 'avatar',
'website', 'membership', 'birthday', 'telephone', 'street_name',
'post_code', 'city', 'comment'
'post_code', 'city'
)
def clean_birthday(self):
if self.cleaned_data['membership'] and not self.cleaned_data[
'birthday']:
if self.cleaned_data['membership'] and not self.cleaned_data['birthday']:
raise forms.ValidationError(_('For your membership, we need this. \
Please fill out this field yet.'))
return self.cleaned_data['birthday']
def clean_telephone(self):
if self.cleaned_data['membership'] and not self.cleaned_data[
'telephone']:
'telephone']:
raise forms.ValidationError(_('For your membership, we need this. \
Please fill out this field yet.'))
return self.cleaned_data['telephone']
def clean_street_name(self):
if self.cleaned_data['membership'] and not self.cleaned_data[
'street_name']:
'street_name']:
raise forms.ValidationError(_('For your membership, we need this. \
Please fill out this field yet.'))
return self.cleaned_data['street_name']
def clean_post_code(self):
if self.cleaned_data['membership'] and not self.cleaned_data[
'post_code']:
'post_code']:
raise forms.ValidationError(_('For your membership, we need this. \
Please fill out this field yet.'))
return self.cleaned_data['post_code']
@@ -145,6 +144,7 @@ class RegistrationForm(forms.ModelForm):
user.is_active = False
if commit:
user.save()
activation = models.ActivationRequest.objects.create_pending_registration(user) # @IgnorePep8
activation = models.ActivationRequest.objects.create_pending_registration(
user) # @IgnorePep8
self.send_email(activation)
return user