Disable keyword setting
This commit is contained in:
parent
11e72af6c9
commit
9bc417031d
1 changed files with 8 additions and 8 deletions
|
@ -455,14 +455,14 @@ def handle_object_dict(object_dict, model_name, debug=False):
|
|||
if object_dict['area'] == '':
|
||||
object_dict['area'] = -1
|
||||
if model_name == 'Keyword':
|
||||
object_dict['keyword'] = object_dict['keyword_id']
|
||||
object_dict.pop('keyword_id')
|
||||
if object_dict['keyword'] == '':
|
||||
object_dict['keyword'] = 0
|
||||
try:
|
||||
object_dict['keyword'] = Keyword.objects.get(keyword_id=0) # default Keyword which exists already
|
||||
except Keyword.DoesNotExist as dne:
|
||||
print(str(dne))
|
||||
# object_dict['keyword'] = object_dict['keyword_id']
|
||||
# object_dict.pop('keyword_id')
|
||||
# if object_dict['keyword'] == '':
|
||||
# object_dict['keyword'] = 0
|
||||
# try:
|
||||
# object_dict['keyword'] = Keyword.objects.get(keyword_id=0) # default Keyword which exists already
|
||||
# except Keyword.DoesNotExist as dne:
|
||||
# print(str(dne))
|
||||
if object_dict['mother'] == '':
|
||||
object_dict['mother'] = 0
|
||||
try:
|
||||
|
|
Loading…
Reference in a new issue