تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
5003 أدوات العرض

How can i overwrite the value of "self._uid" based on special condition

Eg:- self._uid = int(my_userid) gives an error "AttributeError: can't set attribute"

Any thought on this is appreciated !..

الصورة الرمزية
إهمال
أفضل إجابة

 use self.sudo(my_userid), it will set the uid value in the self .

self.sudo(my_userid)
الصورة الرمزية
إهمال
الكاتب

Hi Prakash , Thanks for your answer , but this is not compatible with version 7 . Am actually trying to implement this small fix in version 7 . Is there any alternatives or for this .. Thanks ..

المنشورات ذات الصلة الردود أدوات العرض النشاط
0
سبتمبر 19
98
1
يوليو 17
4198
4
أغسطس 16
8410
1
مارس 16
5020
2
مارس 16
7290