Nikki5 commited on
Commit
2fd742b
·
1 Parent(s): a97666f

issue with function def not found

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -133,6 +133,14 @@ def get_counts_doc():
133
  if not doc:
134
  raise ValueError("Counts document not found. Please create it manually.")
135
  return doc
 
 
 
 
 
 
 
 
136
  def increment_support_type_count(condition_key, support_type, session_id):
137
  init_mongo()
138
 
 
133
  if not doc:
134
  raise ValueError("Counts document not found. Please create it manually.")
135
  return doc
136
+
137
+ def has_assignment_been_counted(session_id):
138
+ init_mongo()
139
+ doc = mongo_collection.find_one(
140
+ {"session_id": session_id},
141
+ {"_id": 0, "count_recorded": 1}
142
+ )
143
+ return bool(doc and doc.get("count_recorded"))
144
  def increment_support_type_count(condition_key, support_type, session_id):
145
  init_mongo()
146