|
@@ -1,6 +1,8 @@
|
|
|
import psycopg2
|
|
import psycopg2
|
|
|
import re
|
|
import re
|
|
|
|
|
|
|
|
|
|
+from pprint import pprint
|
|
|
|
|
+
|
|
|
|
|
|
|
|
def get_events():
|
|
def get_events():
|
|
|
"""Simply retrieve events"""
|
|
"""Simply retrieve events"""
|
|
@@ -41,7 +43,8 @@ def create_links(news_string):
|
|
|
def is_broadcast(cur, this_id):
|
|
def is_broadcast(cur, this_id):
|
|
|
query = f"""SELECT COUNT(*) FROM human_resource WHERE event = {this_id};"""
|
|
query = f"""SELECT COUNT(*) FROM human_resource WHERE event = {this_id};"""
|
|
|
res = database_select(cur, query)
|
|
res = database_select(cur, query)
|
|
|
- boolean = True if res[0] == 1 else False
|
|
|
|
|
|
|
+ pprint(res)
|
|
|
|
|
+ boolean = True if res[0][0] == 1 else False
|
|
|
return boolean
|
|
return boolean
|
|
|
|
|
|
|
|
|
|
|