Skip to content

Commit

Permalink
🐛Fix error raised when create_ops=[] or update_ops=[]
Browse files Browse the repository at this point in the history
- Closes #312
  • Loading branch information
yezyilomo committed Dec 7, 2023
1 parent 6f9e2cf commit 6dcfcb9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion django_restql/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@ def BaseNestedFieldSerializerFactory(

def join_words(words, many='are', single='is'):
word_list = ["`" + word + "`" for word in words]
sentence = " & ".join([", ".join(word_list[:-1]), word_list[-1]])

if len(words) > 1:
sentence = " & ".join([", ".join(word_list[:-1]), word_list[-1]])
return "%s %s" % (many, sentence)
elif len(words) == 1:
return "%s %s" % (single, word_list[0])
Expand Down

0 comments on commit 6dcfcb9

Please sign in to comment.