app/soc/views/models/user.py
changeset 473 d01d5e3b0b5c
parent 470 7ba510d3fad3
child 479 50bab5e71a66
equal deleted inserted replaced
472:519c298a4f87 473:d01d5e3b0b5c
    66       raise forms.ValidationError("This link name is in wrong format.")
    66       raise forms.ValidationError("This link name is in wrong format.")
    67 
    67 
    68     properties = {'link_name': link_name}
    68     properties = {'link_name': link_name}
    69     user = soc.logic.models.user.logic.getForFields(properties, unique=True)
    69     user = soc.logic.models.user.logic.getForFields(properties, unique=True)
    70 
    70 
    71     if user and user.link_name != link_name:
    71     if user and user.link_name == link_name:
    72       raise forms.ValidationError("This link name is already in use.")
    72       raise forms.ValidationError("This link name is already in use.")
    73 
    73 
    74     return link_name
    74     return link_name
    75 
    75 
    76   def clean_id(self):
    76   def clean_id(self):