casrar / Sentireddit

A self hostable full stack app to provide sentiment analysis Reddit data.
0 stars 0 forks source link

Fix bugs on webpage from updating DB architecture #37

Closed casrar closed 9 months ago

casrar commented 10 months ago

Look at previous code and the variable names:

'body': match.body, 
'post_id': match.id, 
'subreddit': subreddit_name, # subreddit and search term use what is stored in DB
'search_term': keyword, 
'data_source': data_source_id,
'post_date': match.created_utc, 
'sentiment': match.sentiment_analysis

new db architecture

'body': comment[COMMENT_BODY],
'post_id': comment[COMMENT_POST_ID],
'comment_id': comment[COMMENT_ID],
'created_timestamp': comment[COMMENT_CREATED_TIMESTAMP],
'data_source': data_source[DATA_SOURCE_ID], 
casrar commented 10 months ago

It appears like the unix time stamps I convert from the form are smaller than the ones from the scraper, needs research

casrar commented 10 months ago

Just hooked up data deletion on data source deletion, still need to update UI as well. But, backend is functional.

casrar commented 10 months ago

UI is now hooked into changes, need to fix errors when all data/sources are deleted. KILLS EVERYTHING!

casrar commented 10 months ago

Fixed issue where if no items exist, flask errors. New errors found; can't delete last piece of data, errors and page wont update. If data source doesnt have data, wont load under data sources.

casrar commented 9 months ago

Fixed the issues with deletion and display, kind of out of scope, but thats okay

casrar commented 9 months ago

Done with branch