Generate Fam status based on article status
Some article states should be reflected in the RedFam status Related Task: [https://fs.golderweb.de/index.php?do=details&task_id=89 FS#89]
This commit is contained in:
@@ -68,6 +68,7 @@ class RedFam:
|
||||
self._beginning = beginning
|
||||
self._ending = ending
|
||||
self._redpageid = redpageid
|
||||
self._status = set()
|
||||
self._status = self._parse_status(status)
|
||||
self._famhash = famhash
|
||||
self._heading = heading
|
||||
@@ -686,8 +687,24 @@ class RedFamWorker( RedFam ):
|
||||
"""
|
||||
Sets status to 3 when worked on
|
||||
"""
|
||||
for article in self._articlesList:
|
||||
if self.article_has_status( "note_rej", title=article ):
|
||||
self.add_status( "note_rej" )
|
||||
if self.article_has_status( "sav_err", title=article ):
|
||||
self.add_status( "sav_err" )
|
||||
|
||||
pass
|
||||
if not self.has_status( "sav_err" ) and \
|
||||
not self.has_status( "note_rej" ):
|
||||
self.add_status( "marked" )
|
||||
|
||||
self._mysql.data[ 'status' ] = self._raw_status()
|
||||
index = 0
|
||||
for article in self._articlesList:
|
||||
self._mysql.data[ "article" + str(index) + 'status' ] = \
|
||||
self._article_raw_status( index=index )
|
||||
index += 1
|
||||
|
||||
print( repr(self) )
|
||||
|
||||
def get_disc_link( self ):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user