Fix to assign enum to string
Created by: dawidzim
Hey!
This pull request is for assign enum to string. Correct way to do this is to use method name():
The name() method returns the string representation of the given enumeration value. If the given value is not a member of the enumeration, the name() method returns the empty string